Skip to content

FixAuditoria/GoWorkshop

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

57 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

diagram

"TODO List" experiment project

This repository is an example project which demonstrates the use of microservices for a fictional TODO list application. The TODO backend is powered by 3 microservices, all of which happen to be written in Go, using MongoDB for manage the database and Docker to isolate and deploy the ecosystem.

In real world each service should live in a separate repository, so teams can work separately and don't overlap each other, however in this demo project they just located in separate folders for easy use.

Services organization

The application consists of the following application services:

Service Port Description Methods
users 50000 Provides users information CreateUser
list 50001 Manages items in todo lists CreateItem, GetUserItems, DeleteItem
notifier 50002 Send email notifications Email

Client web application is working on http://localhost:3030.

diagram2

Requirements

Run

docker-compose pull
docker-compose up

Go to http://localhost:3030 to test gRPC from webapp.

Generate source code for the gRPC client from .proto files

  • Install Go
  • Install Protocol Buffers
  • Install protoc plugin: go get github.com/golang/protobuf/proto github.com/golang/protobuf/protoc-gen-go
protoc --go_out=plugins=grpc:. proto/users/service.proto
protoc --go_out=plugins=grpc:. proto/list/service.proto
protoc --go_out=plugins=grpc:. proto/notifier/service.proto

About

Repository for "Microservices with Golang" workshop at Wizeline.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Go 77.7%
  • HTML 12.6%
  • Dockerfile 9.7%