“Microservices patterns” book review
Microservices stormed the IT world in the previous decade, and it seems that they’re going to stay with us. Tooling around them has matured tremendously – that’s for sure. The question is – what about the good practices and patterns? Let’s find out.
Table of Contents
ToggleMicroservices patterns – what are they?
As simple as it gets – referring to the classic by the gang of four – patterns are well-established and tested ways of doing specific things. As with creating code, some types of patterns have emerged, the same goes for microservices. Due to their nature (web-based, distributed, CAP present), several problems and concepts appeared, and patterns are there to help coping with them. This is what the book is about – listing those troubles, and presenting specific patterns in order to solve the problems.
At this stage it is worth mentioning the author. Chris Richardson is not a rookie in this. He is a Java Champion, and one of the original founders in CloudFoundry.org and early days of Java PaaS for Amazon EC2. I would say that those are the credentials that speak for themselves.
Great! Where are we going?
The book is divided into several chapters (13 to be exact), which describe the process of introducing microservice architecture into the fictional company – “Food to go” (FTGO). We go through every step along the way. The book starts with explaining the hell of the monolith, and how to address it. Later, the author writes about architecture of the distributed systems, and how it can be built and maintained. To me, those chapters feel like a refresher course, but I would argue that they can be safely skipped. Why? In my opinion, when the book was released (which was in 2018), the knowledge presented was something new. From the perspective of the year 2024 – it’s just a common-sense and regular day-at-the-office kind of knowledge.
Later, we proceed to the actual patterns. The author writes about communication between microservices, how to handle it, and what are the most important aspects that must be addressed. In general, I find this approach the main advantage of the book. Instead of just presenting, the author points out typical errors and potential troubles in implementation. That’s why this book is so good. On top of the communication, Richardson builds further – explaining implementing business logic (in the DDD-style kind of way), with the CQRS pattern along the way. Here is where I don’t fully agree with the author. From the current perspective, DDD presented in the book is not a silver bullet, and should be approached with caution. I recommend a very detailed and practical series of blog posts (in 4 parts) by Sebastian Gębski, titled “The failed promise of DDD”. I think the title speaks for itself.
Where does it end?
As I’ve mentioned above – we go through every step of microservices introduction, so the author did not stop at the bussiness logic. He elaborates on the operational excellency, when it comes to the microservices. How to test them (well… you can’t do that fully 😉 ), how to deal with the external systems, deployments and observability. Those chapters cover important stuff – that’s for sure. However, they are the most outdated ones. In terms of CI/CD, IoC, metrics, tracing and observability, we have come a long way since 2018. Some tools are not in use anymore. For some of the topics, the overall approach changed. Despite all of that, those chapters still revolve more around patterns and principles, using the specific tools just to illustrate them. There’s no value added in skipping those chapters.
The book finishes with the chapter dedicated to the more processual description of the migration process. The chapter is short, so no point in skipping it, however, I think that right now the go-to books in that area should be well-known Sam Newman’s books – “Building Microservices 2ed” and his “Monolith to Microservices”. They are more up-to-date, and were (re)written with even more years of experience in microservices architecture.
Summary
Should I read “Microservices Patterns”? Yes, you should. With all the things I’ve mentioned above, it’s still a very good lecture. What is more – I find the business-related chapters more detailed, than the ones from Sam Newman’s books. So in order to get an overall picture – don’t hesitate and read the all 😉
Leave a Reply
You must be logged in to post a comment.