Microservices for everyone
Microservices for everyone
Minimum price
Suggested price
Microservices for everyone

This book is 100% complete

Completed on 2017-09-25

About the Book

Microservices for everyone is a catalog of the major design choices you have to make when you're setting up a system of microservices. Amongst many things, you'll learn about asynchronous integration, independent deployability, continuous delivery, and immediate versus eventual consistency.

If you keep this book within reach, you should be able to safely navigate the daunting, yet wonderful world of microservices. Besides the basics, this book contains many references to further reading material.

Print edition

You can order physical copies of this book on Amazon US (also in UK and DE).

What people say about this book

"This book showed me what I needed to know to actually start playing with microservices. It had the right blend of why and how without too much focus on implementation details. Highly recommended!" - Beau Simensen

"A rich and concrete resource to accompany us in the DDD / Microservices adventure!" - Sébastien Grans

"Read, Learn, Succeed! A comprehensive and really complete guide for creating microservices from scratch! Matthias can abstract the topic complexity in this book that is really, for everyone." - Christophe Willemsen

"As Microservices become more and more popular each day, it's important for professional developers to familiarize themselves with the basic concepts. As with his previous books, Matthias explains these concepts well, in a clear and concise manner. His examples are useful, and the reader is presented with a solid introduction to using Microservices. Highly recommended!" - Mark Badolato

"An excellent book which tackles the complexity of microservice architecture and provides thorough explanations of the concepts behind it. All in a concise, yet very approachable manner!" - Kamil Kokot

About the Author

Matthias Noback
Matthias Noback

Matthias Noback has been building web application since 2003. He is the author of A Year With Symfony, Principles of Package Design and Microservices for everyone. He is a regular speaker at conferences and regularly posts on his blog. While always striving for better programming practices in general, he’s taken a special interest in application architecture, Domain-Driven Design, testing, microservices and application integration patterns.

Table of Contents

    • Foreword
    • Preface
      • Scepticism
      • Optimism
      • Why I have to write this book
      • Design guidelines for this book
      • Rigor?
      • Ethics
      • Some meta-comments
      • Overview of the contents
    • Acknowledgments
    • Introduction
      • What is the promise of microservices?
      • The microservice maturity model
        • Modularized Microservice Architecture
        • Cohesive Microservice Architecture
        • Systematized Microservice Architecture
      • Taking a breath
  • Modularized microservice architecture
    • Independent deployability & Polyglotism
      • Introducing Docker Engine
      • Managing multiple containers with Docker Compose
        • Overriding Compose configuration
          • Environment variables
          • Volumes
          • Build configuration
      • Deploying containers with Docker Machine and Docker Swarm Mode
      • Setting the stage for a multi-service polyglot deployment
        • Docker Machine and Docker Compose
        • A quick project tour
        • Introducing Docker Swarm
        • Independent deployability—at last
          • Rolling updates
      • Conclusion
    • Testability and independent manageability
      • Improving the safety of change with Continuous Delivery
      • Continuous delivery with Docker in a microservice architecture
      • An example of a build pipeline for one microservice
        • Running the unit tests
        • Building the service image
        • Running the service tests
        • What else do we need in a build pipeline?
        • End-to-end tests
      • Conclusion
  • Cohesive microservice architecture
    • Communication styles
      • Integration requirements
      • Integration styles
        • File transfer
        • Shared database
        • Remote procedure invocations, or: service API integration
        • Messaging integration
      • Characteristics of integration solutions
        • Blocking versus non-blocking IO
        • Synchronous versus asynchronous protocols
        • Synchronous versus asynchronous integration
    • Implementation examples
      • The setup
      • Example: Synchronous integration, synchronous protocol, blocking IO
      • Intermediate example: Synchronous integration, mixed non-blocking IO
      • Example: Synchronous integration, fully non-blocking IO
      • The need for statelessness
      • Example: A circuit breaker for synchronous communication
        • A flaky service
      • The circuit breaker in action
        • Limitations
      • Example: Asynchronous integration, asynchronous protocol, blocking IO
        • Setting up RabbitMQ
        • The producer
    • Data and data formats
      • Introducing the example
      • Schema-less (de)serialization
      • Custom (de)serialization
      • Schema validation
      • Upcasting
      • Generated (de)serializers
        • Validation of values
    • Persistence
      • Mutable state
        • Anemic domain model
        • Rich domain model
        • Persisting mutable-state objects
        • Observations
          • Data loss
          • Identity generation
          • CRUD
      • Event sourcing
        • Event-sourced object design
        • Event-sourced persistence
      • Conclusion
    • Data locality
      • Fetching information when needed
        • REST
        • Caching HTTP responses
          • Client-side cache
          • Network-level cache
      • GraphQL
      • Get notified about new information
        • CQRS part I
          • Example 1: Filters
          • Example 2: Accumulations
        • Alternative setups
          • Notifications as RESTful resources
          • Streams
          • When you don’t want to send notifications
      • Conclusion
    • Service boundaries
      • Boundaries
      • Monolith first?
      • Bounded contexts
      • Finding service boundaries
        • Subdomains
        • Existing departments
        • Existing applications
        • Process stages
        • Team throughput
      • Independence requires alignment
      • Conclusion
    • Process management
      • Things that transcend service boundaries
      • Process managers
      • Conclusion
    • Consistency
      • State changes
      • Transactions
      • Aggregate design
        • Several ways to work with events
        • Dispatch events internally or always publish them too?
      • Eventual consistency
      • Conclusion—Programming in the fourth dimension
  • Conclusion
      • Opposition
      • Consider building a monolith
      • Opposites and trade-offs
    • Closing words
  • Notes

The Leanpub 45-day 100% Happiness Guarantee

Within 45 days of purchase you can get a 100% refund on any Leanpub purchase, in two clicks.

See full terms...

Write and Publish on Leanpub

Authors, publishers and universities use Leanpub to publish amazing in-progress and completed books and courses, just like this one. You can use Leanpub to write, publish and sell your book or course as well! Leanpub is a powerful platform for serious authors, combining a simple, elegant writing and publishing workflow with a store focused on selling in-progress ebooks. Leanpub is a magical typewriter for authors: just write in plain text, and to publish your ebook, just click a button. It really is that easy.

Learn more about writing on Leanpub