microservices-patterns / ftgo-application

Example code for the book Microservice patterns
Other
3.41k stars 1.32k forks source link

gRPC - is it used in FTGO app by some service? #50

Closed asn25 closed 4 years ago

asn25 commented 4 years ago

Hello,

some questions regarding to gRPC API of Order Service:

1) Is it used in FTGO app by some service? If yes then, as I understand, there should be a client part in some service that making gRPC-calls. I see usage of gRPC in integration tests (OrderServiceClient, OrderServiceGrpIntegrationTest, OrderServiceGrpIntegrationTestConfiguration), but is it used in the app itself?

2) If it's not used in the app in reality by the moment, so how it shoud be used in theory? What services should use it? If service use gRPC, does it mean that this is a replacement of REST API and we can throw away REST APIs?

3) Does it make sense to replace all internal REST-communication with gRPC? How architecture would look like in this case?

Thanks, Andrew

cer commented 4 years ago
  1. No. Only in tests.
  2. The REST APIs could be replaced with gRPC
  3. The architecture would not be that much different. The API gateway would translate between REST and gRPC.