Microservice - basic
http://callistaenterprise.se/blogg/teknik/2017/02/17/go-blog-series-part1/
https://ryanmccue.ca/creating-a-microservice-with-golang-and-goa/
https://yami.io/go-kit-example/
http://btfak.com/微服务/2016/03/28/go-micro/
https://wuyin.io/2018/02/22/learning-go-content-notes/
https://wuyin.io/2018/03/07/50-shades-of-golang-traps-gotchas-mistakes/
https://blog.gopheracademy.com/advent-2017/go-grpc-beyond-basics/
https://wuyin.io/2018/05/10/microservices-part-1-introduction-and-consignment-service/
https://github.com/astaxie/build-web-application-with-golang
BACKGROUND
What is a Microservice?
traditional monolith application = organisations are grouped together within a single codebase.
microservice = independent runnable codebase.
Scale (monolith)
Scale (microservice)
If your auth service is hit constantly, you need to scale the entire codebase to cope with the load for just your auth service.
scale individual services individually.
protobuf/gRPC
If communicates in traditional REST = service A has to encode its data into JSON/XML, send a large string over the wire, to service B, which then has to decode this message from JSON, back into code.
What are protobuf and gPRC.
gRPC = light-weight binary based RPC communication protocol
Protobuf = define an interface to your service using a developer friendly format. protobuf is an interchange DSL of gRPC.

WORKFLOW
Install tools
.proto file
.proto fileMakefile
generated consignment-service/proto/consignment/consignment.pb.go
pb.go TL DR
pb.go TL DRYou have to define service struct by yourselves in consignment-service/main.go
Docker
Last updated