Hello everybody. I just started getting acquainted with GO and writing microservices in it. I practiced a couple of projects specifically writing backends. I want to write a news portal for myself. I’ve Parsed a couple of news sites for the database. And I wrote a REST admin panel for my portal. Now I want to write the backend of the portal itself on gRPC. The question is how to properly organize the structure of the code. Examples of projects written in gRPC would also be very helpful. Any advice from anyone who has dealt with gRPC is also welcome.
This example of structure is common, https://github.com/GoogleCloudPlatform/microservices-demo
I use the pb package for store the proto files, and every microservice has a shell to get this proto and include this on my application and generate the buffer messages, take a look at the link
src/ cartservice/ pb/ cart.pb.go (generated by genproto.sh) genproto.sh sessionservice/ pb/ session.proto.go (generated by genproto.sh) genproto.sh .... pb/ cart.proto session.proto
This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.