DEV Community

Ewetumo Alexander
Ewetumo Alexander

Posted on

Insightful Mental Model in Microservice Communication.

This is a short post really. I have always had a hard time with the mental model of where the communication paradigms of Request-Response and Event-Sourcing/CQRS model of communication should be used in a microservice.

There are usual questions in my mental model like:

  1. Is it all Events/CQRS model for all microservice and interactions with the each other and the frontends ?
  2. How do you deal with situations that can't work asynchronously like Login or Registration, Which fit well to a Request-Response model but might require some work if we want to do so asynchronously in an Event based approach?
  3. Whether this paradigms must be used singularly or combined ?
  4. If combined how and what boundaries define how they work in the full scope of things?

But reading this post Microservice Principles: Smart Endpoints and Dumb Pipes by Nathan Peck really helped.

Sometimes being used to developing monoliths can cause some mental block in how you model microservice implementation mentally, and though I have read at length, only a few posts like this, do help to further help clarify and simplify my thoughts.

I do hope you gain from the post as well.

Best Regards,
Alex.

Latest comments (1)

Collapse
 
rhymes profile image
rhymes

Thank you Ewetumo, that was very well written.

Yesterday I read this post and the two following it and it clarified a lot of things for me:

Cloud-native architecture with serverless microservices — the Smart Parking story

It's definitely Google Cloud centric but I found it very interesting.