Building Microservices

Aleksandr Shitik
Aleksandr Shitik

I write my own posts and books, and review movies and books. Expert in cosmology and astronomy, IT, productivity, and planning.

Building Microservices
Sam Newman
Genres: Programming
Year of publication: 2016
Year of reading: 2020
My rating: Good
Number of reads: 1
Total pages: 304
Summary (pages): 15
Original language of publication: English
Translations to other languages: Russian, Chinese

General Information

The book is 304 pages long, consisting of 12 chapters without subdivision into sections. The reading difficulty is moderate (though not due to technical complexity, but rather because of the continuous text). There are few code inserts, almost no images, but various diagrams and schematics appear periodically. At the end of each chapter, there is a brief summary.

Book Content

The first chapter is about the concept of microservices. Their advantages and disadvantages. Features (e.g., each microservice can have its own database or deployment).

The second chapter is devoted to when and how to break a monolith into microservices and how to define boundaries.

The next chapter is even more theoretical — about service modeling, or rather about the criteria it should meet (loose coupling and strong cohesion).

The fourth chapter is about how to "connect" microservices within a system. The rules and mechanisms for communication are discussed here. Also covered are working with API, RPC, REST, database interaction, JSON, and everything else you probably work with every day.

Next is a chapter on splitting a monolith into parts. More practical, as it uses a fictional example, though it typically doesn’t go beyond flowcharts.

The subsequent chapter is again about deployment. Without specifics, it simply lists some tools, such as Puppet, Chef, and Ansible. A few words about CI/CD, configuration, different runtime environments, containerization, and much more. As always — lots of blocks and diagrams, but no code, not even config files.

Next, we gradually approach the topic of testing microservices. Here, there’s probably no need to dwell, as the approaches and principles are quite similar to regular testing.

Next is a chapter on monitoring. What’s unusual here is perhaps the specifics of monitoring when one service is located in multiple places, as well as the general peculiarities of monitoring for microservices. Otherwise, everything is quite standard.

The next chapter is also dedicated to one of the requirements for any software — security. A strong emphasis is placed on authorization and authentication, building firewalls, and the like.

As the book approaches its conclusion, the author touches on Conway’s Law (the law stating that the structure of software is directly proportional to the organization’s structure and established communication). The discussion revolves around how suitable microservices are for this.

The penultimate chapter is another modern requirement for software — scalability. It covers the peculiarities of scaling microservices, caching, the CAP theorem, and much more.

The final chapter is a kind of overview of everything discussed above and covers questions that haven’t been addressed yet and are hard to attribute to any specific chapter (e.g., failures and recovery).

Opinion

After reading the book, I was left with mixed feelings: on one hand, the book is dry and purely theoretical; on the other — it’s very good for broadening horizons and filling knowledge gaps. The book covers topics such as: the advantages of microservices over monoliths, CI/CD for microservices, security, testing and monitoring, scalability, proper splitting of a monolith into microservices, and practical technologies that can solve various problems when working with microservices. On the plus side, the navigation is definitely good and clear. On the downside, as already noted: it reads moderately and sometimes tediously, with few code examples, and it’s mostly theoretical. Despite the drawbacks, I would still recommend getting acquainted with it or at least giving it a chance, as the material does a good job of closing some knowledge gaps and thoroughly covering the topic of microservices.

Вверх