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:
- Is it all Events/CQRS model for all microservice and interactions with the each other and the frontends ?
- 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?
- Whether this paradigms must be used singularly or combined ?
- 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.