Reactive Microsystems

Book description

If you want your application to provide millisecond response times and close to 100% uptime, traditional architectures with single SQL databases and thread-per-request models simply cannot compete with microservices. This report discusses strategies and techniques for building scalable and resilient microservices, and helps you work your way through the evolution of a scalable microservices-based system.



When it comes to development speed, time-to-market, and continuous delivery, microservices can do wonders for your organization. Author Jonas Bonér, Founder and CTO of Lightbend and author of Reactive Microservices Architecture (O’Reilly), demonstrates how to refactor a monolithic application step-by-step. You’ll briefly land at single-instance microliths (micro monoliths) before working your way toward a scalable and resilient microsystem.



This report will help you:



  • Examine the essential traits of an individual reactive microservice
  • Understand why monolithic architectures are a problem
  • Manage the hard part of microservice design: the space between individual services
  • Shift the focus from domain objects to events in domain-driven design
  • Make services more efficient, performant, and stable by applying reactive programming techniques
  • Make the services work together collaboratively, as a single reactive system
  • Move beyond CRUD towards Event Sourcing/CQRS to scale state in an event-based design
  • Leverage fast data in microservices to manage real-time data at scale

Table of contents

  1. Introduction
    1. The Evolution of Scalable Microservices
    2. We Can’t Make the Horse Faster
    3. We Need to Learn to Exploit Reality
    4. Don’t Just Drink the Kool-Aid
  2. 1. Essential Traits of an Individual Microservice
    1. Isolate All the Things
      1. Act Autonomously
    2. Single Responsibility
    3. Own Your State, Exclusively
    4. Stay Mobile, but Addressable
  3. 2. Slaying the Monolith
    1. Don’t Build Microliths
  4. 3. Microservices Come in Systems
    1. Embrace Uncertainty
    2. We Are Always Looking into the Past
    3. The Cost of Maintaining the Illusion of a Single Now
    4. Learn to Enjoy the Silence
    5. Avoid Needless Consistency
  5. 4. Events-First Domain-Driven Design
    1. Focus on What Happens: The Events
      1. Events Represent Facts
      2. Elementary, My Dear Watson
      3. Using Event Storming
    2. Think in Terms of Consistency Boundaries
      1. Aggregates—Units of Consistency
      2. Contain Mutable State—Publish Facts
    3. Manage Protocol Evolution
  6. 5. Toward Reactive Microsystems
    1. Embrace Reactive Programming
      1. Go Asynchronous
      2. Reconsider the Use of Synchronous HTTP
      3. Always Apply Backpressure
      4. At Someone Else’s Mercy
      5. Toward Reactive Microliths
    2. Embrace Reactive Systems
      1. Decoupling in Time and Space
      2. Elasticity through Location Transparency
      3. Location Transparency Enables Mobility
      4. Location Transparency Enables Dynamic Composition
      5. Self-Healing Through Bulkheading and Supervision
    3. Microservices Come as Systems
      1. Scaling State and Behavior Independently
      2. Enter Reactive Microsystems
  7. 6. Toward Scalable Persistence
    1. Moving Beyond CRUD
    2. Event Logging—The Scalable Seamstress
      1. Event Sourcing—A Cure for the Cardinal Sin
      2. Untangle Your Read and Write Models by using CQRS
      3. Coordinating Work Across Aggregates
      4. Leverage Polyglot Persistence
      5. Know Your Trade-offs
    3. Transactions—The Anti-Availability Protocol
      1. Don’t Ask for Permission—Guess, Apologize, and Compensate
      2. Use Distributed Sagas, Not Distributed Transactions
      3. Distributed Transactions Strikes Back
  8. 7. The World Is Going Streaming
    1. Three Waves Toward Fast Data
    2. Leverage Fast Data in Microservices
  9. 8. Next Steps
    1. Further Reading
    2. Start Hacking

Product information

  • Title: Reactive Microsystems
  • Author(s): Jonas Bonér
  • Release date: September 2017
  • Publisher(s): O'Reilly Media, Inc.
  • ISBN: 9781491994351