I just ended reading Practical Microservices: Build Event-Driven Architectures with Event Sourcing and CQRS by Ethan Garofolo.📚 This book finally gave me an understanding of microservices I now see the value in this architecture.
Before the book, my understanding was, that I split my monolithic data model into multiple smaller data models and connect everything back together. However, I was never so happy with this concept, as we now lose the capability to make SQL joins over the full data model. Moreover, the introduction of multiple additional backends just increased the complexity. Sure this provides also some value, as long as you not couple the data sets on the different services. But at some point, you will need to connect the data sources.
The book proposes another concept to solve this problem. We get rid of the classical data model in a database. And instead, record a series of commands and events. The GUI sends commands for the actions of the users, which the services then pick up on. The result of the services are events which encode the change to the entity data in an event stream.
The stream of entity events encodes all the data changes from the beginning of the app until now. Now, this data is not in an ideal form to display to your users. To solve this issue, we have additional components called aggregators. Aggregators observe the entity stream and combine relevant events into a single read model. A read model is a small part of data which can directly be read and displayed inside your app.
I like this book; it managed to give me the motivation to try modeling an application with this new architecture in my free time. Something, I used to enjoy and do quite often – but could not find any motivation or energy in the past years.
No comments received yet.
- Write your comment on your on page and link it to this page with the following link:
- Insert the permalink to your post in the form below
- Submit the form
Alternatively you can reach me by email to: firstname.lastname@example.org