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