If you are looking to get introduced to the world of microservices or you simply need to consolidate your knowledge of the patterns used in microservice oriented architectures, you cannot miss the new Chris Richardson’s book Microservices Patterns with examples in Java.
Richardson is a software architect with extensive experience in the field of microservices. He is the creator of microservices.io and the original cloudfoundry.com. He also authored POJOs in Action and he is the founder of the microservices application platform eventuate.io. He is a consultant and a skilled speaker which attends regularly top tier conferences.
The book is composed of 12 chapters and it includes clear diagrams and Java code snippets built on top of the Spring framework.
The first two chapters deal with describing monolithic hell and presenting microservices architecture as an alternative. Concrete strategies to decompose your monolith, or to plan your microservice system, are presented such as decomposition by business capability or by sub-domain.
The third chapter focuses on interprocess communication. Richardson believes firmly in API-First design. He then introduces synchronous and asynchronous messaging patterns with references to REST, gRPC and message brokering.
Chapter 4, 5, 6 and 7 are more focused on design concerns. You will read on how to organize your business logic in a microservice architecture using domain driven development or event sourcing. You also learn about to handle transactions with the saga pattern, or how to decouple command execution from querying with the CQRS pattern.
In chapter 8, Richardson discusses how you should expose your APIs to the public with an API gateway, while chapter 9 and 10 detail how to conduct testing of such systems. Chapter 11 and 12 pave the way to release a microservices system to production.
Finally, there is an entire chapter describing how you should refactor your current system into a microservices one.
Whether you are a developer or an architect, you should read this book. I would advise it even if you think you are familiar with the topics since the landscape is vast and Richardson makes a good job at grouping together over 40 patterns and presenting them in a clear concise way.
If you want to help me grow this blog, you can order your book from Amazon by clicking on the links below. It will cost nothing extra to you, but I will receive an affiliation fee.