thangchung / magazine-website

:mouse: A magazine website (using .NET Core, ASP.NET Core, EF Core) with DDD, CQRS, microservices, asynchronous programming applied...
https://github.com/thangchung/magazine-website
178 stars 51 forks source link

Understanding the flow #25

Closed ysamala closed 7 years ago

ysamala commented 7 years ago

Dear Thang Chung,

Your application design is very good from a Microservice perspective ( dotnet core version). I am little confused on how and where the gateway is used. My understanding is Gateway is the one that will be exposed to your app/website and all microservices will be communicated using the gateway.

Please correct me if I am wrong.

One more question, if Magazine service wants to communicate with the sample service, how can this be achieved.

I am kind of new this concept of Microservices, so trying to understand.

Please help me understand, so that it can be helpful to someone who is willing to learn from your code base.

Thanks & Regards, Raju

thangchung commented 7 years ago

@ysamala Sorry for this very late reply to you. Actually, the flow is really same with any MSA flow at the moment. The request hits to the API gateway, then dispatch it into the downstream services. At the moment if SampleService wants to communication to MagazineService, it should fire an event to the queue(RabbitMQ) and the MagazineService consumes the queue to get the event and continue to processing (what we call here is Eventually Consistency). Let me know if you have any concerns.