New Book Review: "Spring Microservices"

New book review for Spring Microservices, by Rajesh RV, Packt Publishing, 2016, reposted here:

Spring_microservices

Stars-5-0._V47081849_

The mix of theory and practice that this book provides is among the best I have ever run across, although those looking to potentially work through this book should be aware that a number of issues start surfacing in Chapter 5. Hopefully these issues are resolved in the second edition due out in October 2017, but in the meantime this book is second to none in the Spring Boot microservices space, not to mention amongst the best in the general microservices space.

While all 10 chapters provide theory, Chapter 2 and Chapters 5 through 9 also provide development exercises. The discussions and exercises build upon one another as the text progresses, starting with a 100-page introduction to microservices in Chapters 1 and 3 and a Spring Boot introductory exercise in Chapter 2, and a monolith-to-microservices case study in Chapter 4 that provides background for the exercises covered in the next 200-pages. The last chapter (Chapter 10) provides some needed discussion on the microservices development lifecycle, but is in my opinion a bit rushed, so readers should expect the need to explore this topic further using other resources.

While I have been a heavy user of open source software and libraries for many years, the short lifespans of some of the Spring technologies used throughout this book are especially apparent for someone like me who prefers to use the latest releases whenever possible. For example, I initially had no issues updating the projects provided by the author from Spring Boot 1.3.5.RELEASE (May 2016) to 1.5.2.RELEASE (March 2017). But by the time I got to Chapter 8 my decision was to start re-architecting a real product that I had recently built with my development team, and doing so became more difficult as the code base was much more complicated than what is presented by the author.

The one exception was my upgrading of Spring Cloud Brixton.RELEASE (May 2016) to Camden.Release (September 2016) after running into a number of issues with technologies such as Zuul (which is covered alongside other technologies such as Eureka in Chapter 5). However, as my real product extensively used Spring Security as is the case with all serious Spring Boot applications, the complete absence of Spring Security in this book was a surprise. Readers new to Spring in general should expect the need to extensively explore Spring Security apart from this material as it can be one of the most complex Spring projects, and in my experience the community tends to offer very poor guidance.

Other than differences in releases, readers should be aware of other issues in the exercises. While not an issue per se, my qualms began with Chapter 2 where the author begins running Spring Boot applications using "java -jar" on the command line. It wasn't until I started re-architecting and Dockerizing my real product as part of working through Chapter 8 that I realized the author was probably avoiding use of "mvn clean spring-boot:run" because of the way Docker works.

Some issues are relatively more trivial, such as SMTP configuration that mistakenly uses port 2525 rather than the default port of 25 in Chapter 2, although a book written for those new to Spring in general should mention in Chapter 5, for example, that use of Maven profiles are another common option to externalize configuration. Interestingly, some of the content that the author provides is also out of order, the most glaring example of which is toward the tail end of Chapter 5 when setting up Eureka is done after a 16-step process outlining how to access the example configuration server from clients, which itself depends on Eureka being up and running.

Please take my advice and perform the Chapter 8 exercise in Linux after working through the 6-part "Get Started with Docker" series of exercises on the Docker website in Linux as well, as Docker for Windows is a mess right now and the author just does not explain Dockerization very well. And as a long-time user of Spring, I was not aware that not using the spring-boot-starter-parent Maven dependency would lead to incomplete manifest files and therefore the inability to start applications correctly.

So in the end, why did I chose to grant this book 5 stars? Because the author provides a lot of the microservices theory that is skipped elsewhere, and includes practical application as part of the discussion. That said, I suggest additionally checking out 4 freely available microservices books from O'Reilly that I also recently read: "Microservices AntiPatterns and Pitfalls", "Reactive Microservices Architecture", "Microservices vs. Service-Oriented Architecture", and "Migrating to Microservices Databases".

Subscribe to Erik on Software

Don’t miss out on the latest issues. Sign up now to get access to the library of members-only issues.
jamie@example.com
Subscribe