ballerina-guides / gcp-microservices-demo

Ballerina Implementation of GCP Online Boutique Sample
Apache License 2.0
15 stars 38 forks source link

Create a separate package to maintain the generated gRPC clients #34

Closed sameerajayasoma closed 1 year ago

sameerajayasoma commented 1 year ago

There exists a demo_pb.bal file in every service package, containing around 1300 lines. https://github.com/ballerina-guides/gcp-microservices-demo/blob/main/ads/demo_pb.bal https://github.com/ballerina-guides/gcp-microservices-demo/blob/main/cart/demo_pb.bal

How about having a separate package for the generated clients? We can reduce 13,000 lines to 1300 lines with this change.

gimantha commented 1 year ago

@sameerajayasoma @anupama-pathirage I extracted the stub file to a package called gcp.client.stub. Is the name good? or do we have a better suggestion?

dilanSachi commented 1 year ago

This is added with the above package name here https://github.com/ballerina-guides/gcp-microservices-demo/pull/55

dilanSachi commented 1 year ago

Some module name improvements were also done in https://github.com/ballerina-guides/gcp-microservices-demo/pull/56