{"id":491,"date":"2022-01-18T10:49:06","date_gmt":"2022-01-18T15:49:06","guid":{"rendered":"https:\/\/freedville.com\/blog\/?p=491"},"modified":"2022-01-18T10:49:08","modified_gmt":"2022-01-18T15:49:08","slug":"book-review-microservices-in-action","status":"publish","type":"post","link":"https:\/\/freedville.com\/blog\/2022\/01\/18\/book-review-microservices-in-action\/","title":{"rendered":"Book Review: Microservices In Action"},"content":{"rendered":"\n<figure class=\"wp-block-image size-large\"><img decoding=\"async\" loading=\"lazy\" width=\"700\" height=\"472\" src=\"https:\/\/freedville.com\/blog\/wp-content\/uploads\/2022\/01\/laura-ockel-RZSrqJjhkeg-unsplash-1-700x472.jpeg\" alt=\"Collection of small, overlapping gears\" class=\"wp-image-493\" srcset=\"https:\/\/freedville.com\/blog\/wp-content\/uploads\/2022\/01\/laura-ockel-RZSrqJjhkeg-unsplash-1-700x472.jpeg 700w, https:\/\/freedville.com\/blog\/wp-content\/uploads\/2022\/01\/laura-ockel-RZSrqJjhkeg-unsplash-1-300x202.jpeg 300w, https:\/\/freedville.com\/blog\/wp-content\/uploads\/2022\/01\/laura-ockel-RZSrqJjhkeg-unsplash-1-768x517.jpeg 768w, https:\/\/freedville.com\/blog\/wp-content\/uploads\/2022\/01\/laura-ockel-RZSrqJjhkeg-unsplash-1-1536x1035.jpeg 1536w, https:\/\/freedville.com\/blog\/wp-content\/uploads\/2022\/01\/laura-ockel-RZSrqJjhkeg-unsplash-1-2048x1380.jpeg 2048w, https:\/\/freedville.com\/blog\/wp-content\/uploads\/2022\/01\/laura-ockel-RZSrqJjhkeg-unsplash-1-175x117.jpeg 175w\" sizes=\"(max-width: 700px) 100vw, 700px\" \/><figcaption>Microservices are small, partially independent cogs in a larger application.  Photo by <a href=\"https:\/\/unsplash.com\/@viazavier?utm_source=unsplash&amp;utm_medium=referral&amp;utm_content=creditCopyText\">Laura Ockel<\/a> on <a href=\"https:\/\/unsplash.com\/s\/photos\/gears-and-cogs?utm_source=unsplash&amp;utm_medium=referral&amp;utm_content=creditCopyText\">Unsplash<\/a><\/figcaption><\/figure>\n\n\n\n<p>I\u2019m glad I read this \u201cone-stop\u201d microservices book: <a rel=\"noreferrer noopener\" href=\"https:\/\/www.manning.com\/books\/microservices-in-action\" target=\"_blank\">Microservices in Action by Morgan Bruce and Paulo A. Pereira<\/a>.\u00a0 If you have time for just one microservices book, I think you can do well with this book. \u00a0It covers a variety of topics, not just the build and runtime but also the people and organizational aspects.\u00a0 The book has good breadth of topics.<\/p>\n\n\n\n<p>If you have more time however, I recommend reading two different books for a deep dive.\u00a0 The first half of this book is covered more deeply in <a href=\"https:\/\/freedville.com\/blog\/2021\/12\/21\/book-review-microservices-patterns\/\">Microservices Patterns<\/a> and the second half is covered more deeply in <a href=\"https:\/\/freedville.com\/blog\/2021\/11\/05\/book-review-site-reliability-engineering\/\">Site Reliability Engineering<\/a>.\u00a0 Multiple perspectives are often helpful, so you may want to read Microservices In Action first before reading the other two books.<\/p>\n\n\n\n<p>Most of the development techniques I\u2019ve heard for the last few years emphasized shifting as much as possible to the left \u2013 addressing challenges earlier in linear time (left) rather than later (right).\u00a0 The key insight I got from this book is <strong>rather than eliminating risk, microservices moves risk &#8220;to the right&#8221;<\/strong>!\u00a0<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img decoding=\"async\" loading=\"lazy\" width=\"700\" height=\"875\" src=\"https:\/\/freedville.com\/blog\/wp-content\/uploads\/2022\/01\/yeshi-kangrang-14RqNPmDOno-unsplash-700x875.jpeg\" alt=\"Road with left and right turn arrows.\" class=\"wp-image-494\" srcset=\"https:\/\/freedville.com\/blog\/wp-content\/uploads\/2022\/01\/yeshi-kangrang-14RqNPmDOno-unsplash-700x875.jpeg 700w, https:\/\/freedville.com\/blog\/wp-content\/uploads\/2022\/01\/yeshi-kangrang-14RqNPmDOno-unsplash-240x300.jpeg 240w, https:\/\/freedville.com\/blog\/wp-content\/uploads\/2022\/01\/yeshi-kangrang-14RqNPmDOno-unsplash-768x960.jpeg 768w, https:\/\/freedville.com\/blog\/wp-content\/uploads\/2022\/01\/yeshi-kangrang-14RqNPmDOno-unsplash-1229x1536.jpeg 1229w, https:\/\/freedville.com\/blog\/wp-content\/uploads\/2022\/01\/yeshi-kangrang-14RqNPmDOno-unsplash-1638x2048.jpeg 1638w, https:\/\/freedville.com\/blog\/wp-content\/uploads\/2022\/01\/yeshi-kangrang-14RqNPmDOno-unsplash-scaled.jpeg 2048w\" sizes=\"(max-width: 700px) 100vw, 700px\" \/><figcaption>Microservices moves some complexity to the right, instead of to the left.  Photo by <a href=\"https:\/\/unsplash.com\/@omgitsyeshi?utm_source=unsplash&amp;utm_medium=referral&amp;utm_content=creditCopyText\">Yeshi Kangrang<\/a> on <a href=\"https:\/\/unsplash.com\/s\/photos\/left-arrow?utm_source=unsplash&amp;utm_medium=referral&amp;utm_content=creditCopyText\">Unsplash<\/a><\/figcaption><\/figure>\n\n\n\n<p>Like any architectural decision, a microservice architecture introduces tradeoffs.&nbsp; We hear so often that microservices have lower development complexity <strong>within<\/strong> a service, because each service is smaller and has less dependencies.&nbsp; However, the entire microservice application has more complexity, and this is borne out during deployment, verification, and observation.<\/p>\n\n\n\n<p>This style of development requires a different organizational structure \u2013 easier said than done.&nbsp; Each microservice is owned by a multi-functional team (and that team might own multiple microservices).&nbsp; The organizational challenge is clearly getting the different microservice teams to work together in the context of the broader application.<\/p>\n\n\n\n<p>The authors spend a little time on this problem, indicating that some concerns are addressed by overarching product\/technical leadership.\u00a0 But I can\u2019t help but feel that they skimped a bit in this area.\u00a0 I feel that an application with many microservice teams involved is going to devolve into a finger-pointing, \u201cbattlin\u2019 microservice teams\u201d situation.\u00a0 If the application as a whole does not work well, how does that get resolved?<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img decoding=\"async\" loading=\"lazy\" width=\"700\" height=\"467\" src=\"https:\/\/freedville.com\/blog\/wp-content\/uploads\/2022\/01\/rineshkumar-ghirao-UdDjFekHQuk-unsplash-700x467.jpeg\" alt=\"Hands layering on top of each other\" class=\"wp-image-495\" srcset=\"https:\/\/freedville.com\/blog\/wp-content\/uploads\/2022\/01\/rineshkumar-ghirao-UdDjFekHQuk-unsplash-700x467.jpeg 700w, https:\/\/freedville.com\/blog\/wp-content\/uploads\/2022\/01\/rineshkumar-ghirao-UdDjFekHQuk-unsplash-300x200.jpeg 300w, https:\/\/freedville.com\/blog\/wp-content\/uploads\/2022\/01\/rineshkumar-ghirao-UdDjFekHQuk-unsplash-768x512.jpeg 768w, https:\/\/freedville.com\/blog\/wp-content\/uploads\/2022\/01\/rineshkumar-ghirao-UdDjFekHQuk-unsplash-1536x1024.jpeg 1536w, https:\/\/freedville.com\/blog\/wp-content\/uploads\/2022\/01\/rineshkumar-ghirao-UdDjFekHQuk-unsplash-2048x1365.jpeg 2048w, https:\/\/freedville.com\/blog\/wp-content\/uploads\/2022\/01\/rineshkumar-ghirao-UdDjFekHQuk-unsplash-175x117.jpeg 175w\" sizes=\"(max-width: 700px) 100vw, 700px\" \/><figcaption>Teamwork is important, even across microservices! Photo by <a href=\"https:\/\/unsplash.com\/@throwingjungle?utm_source=unsplash&amp;utm_medium=referral&amp;utm_content=creditCopyText\">Rineshkumar Ghirao<\/a> on <a href=\"https:\/\/unsplash.com\/s\/photos\/teamwork-hands?utm_source=unsplash&amp;utm_medium=referral&amp;utm_content=creditCopyText\">Unsplash<\/a><\/figcaption><\/figure>\n\n\n\n<p>I believe the authors skirt this issue because it\u2019s a difficult problem in monolithic applications as well.&nbsp; It\u2019s not clear that microservices help or hurt with complex problem resolution.&nbsp; The authors are quick to mention that debugging across microservices can be difficult but they suggest a number of observability techniques which help.&nbsp; (The monolith world could benefit from this observability techniques as well!)<\/p>\n\n\n\n<p>Like other microservice books, this book urges architects and developers to start with a microservice chassis that provides base infrastructure needed by any microservice.&nbsp; This feels almost undersold \u2013 microservices require so many additional concerns to be effective (common logging, service registry, service discovery, metrics collection, and more) \u2013 that without a good chassis you\u2019ll spend all your time writing (and re-writing) boilerplate code instead of business logic.<\/p>\n\n\n\n<p>A good chassis is going to pull you towards centralized standardization.&nbsp; If you have a chassis you love in Java, that\u2019s powerful gravity towards building each service in Java.&nbsp; This is slightly counter to the \u201cuse whatever platform is best for each service\u201d mantra in microservices.&nbsp; From a CIO perspective I cannot fathom a complete \u201cwild-west\u201d approach is a good idea, on the other hand forcing technology because of a chassis seems like a bad idea too.&nbsp; The authors note that there are not many chassis that work across multiple languages.&nbsp; I would have liked to see more on how you efficiently do observability across say 2-3 different chassis types.<\/p>\n\n\n\n<p>This was the first microservices resource I read that advocated heavily for documentation.&nbsp; It suggested for key types of documentation:<\/p>\n\n\n\n<ul><li>Overview (purpose, intended usage, overall architecture)<\/li><li>Contract (API specification, ie Swagger\/OpenAPI or protocol buffers for gRPC)<\/li><li>Runbooks (Common operational and failure scenarios)<\/li><li>Metadata (programming language, framework versions, links to supporting tools\/builds\/deployments\/etc)<\/li><\/ul>\n\n\n\n<figure class=\"wp-block-image size-large\"><img decoding=\"async\" loading=\"lazy\" width=\"700\" height=\"467\" src=\"https:\/\/freedville.com\/blog\/wp-content\/uploads\/2022\/01\/wesley-tingey-snNHKZ-mGfE-unsplash-700x467.jpeg\" alt=\"Piles of books.\" class=\"wp-image-496\" srcset=\"https:\/\/freedville.com\/blog\/wp-content\/uploads\/2022\/01\/wesley-tingey-snNHKZ-mGfE-unsplash-700x467.jpeg 700w, https:\/\/freedville.com\/blog\/wp-content\/uploads\/2022\/01\/wesley-tingey-snNHKZ-mGfE-unsplash-300x200.jpeg 300w, https:\/\/freedville.com\/blog\/wp-content\/uploads\/2022\/01\/wesley-tingey-snNHKZ-mGfE-unsplash-768x512.jpeg 768w, https:\/\/freedville.com\/blog\/wp-content\/uploads\/2022\/01\/wesley-tingey-snNHKZ-mGfE-unsplash-1536x1024.jpeg 1536w, https:\/\/freedville.com\/blog\/wp-content\/uploads\/2022\/01\/wesley-tingey-snNHKZ-mGfE-unsplash-2048x1365.jpeg 2048w, https:\/\/freedville.com\/blog\/wp-content\/uploads\/2022\/01\/wesley-tingey-snNHKZ-mGfE-unsplash-175x117.jpeg 175w\" sizes=\"(max-width: 700px) 100vw, 700px\" \/><figcaption>Good documentation helps others use your microservices.  Photo by <a href=\"https:\/\/unsplash.com\/@wesleyphotography?utm_source=unsplash&amp;utm_medium=referral&amp;utm_content=creditCopyText\">Wesley Tingey<\/a> on <a href=\"https:\/\/unsplash.com\/s\/photos\/pile-of-documents?utm_source=unsplash&amp;utm_medium=referral&amp;utm_content=creditCopyText\">Unsplash<\/a><\/figcaption><\/figure>\n\n\n\n<p>Further, the authors noted that many of these are hard to keep up to date and suggested to use auto-generation where possible.\u00a0 However they noted that very few tools exist for this purpose and you\u2019re likely to need to roll-your-own.<\/p>\n\n\n\n<p>Overall I am glad I read this book \u2013 a solid contributor to a microservices education.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>I\u2019m glad I read this \u201cone-stop\u201d microservices book: Microservices in Action by Morgan Bruce and Paulo A. Pereira.\u00a0 If you have time for just one microservices book, I think you can do well with this&#8230;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[1],"tags":[],"_links":{"self":[{"href":"https:\/\/freedville.com\/blog\/wp-json\/wp\/v2\/posts\/491"}],"collection":[{"href":"https:\/\/freedville.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/freedville.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/freedville.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/freedville.com\/blog\/wp-json\/wp\/v2\/comments?post=491"}],"version-history":[{"count":1,"href":"https:\/\/freedville.com\/blog\/wp-json\/wp\/v2\/posts\/491\/revisions"}],"predecessor-version":[{"id":497,"href":"https:\/\/freedville.com\/blog\/wp-json\/wp\/v2\/posts\/491\/revisions\/497"}],"wp:attachment":[{"href":"https:\/\/freedville.com\/blog\/wp-json\/wp\/v2\/media?parent=491"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/freedville.com\/blog\/wp-json\/wp\/v2\/categories?post=491"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/freedville.com\/blog\/wp-json\/wp\/v2\/tags?post=491"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}