O'Reilly logo

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Monolith to Microservices

Book Description

How do you detangle a monolithic system and migrate it to a microservices architecture? How do you do it while maintaining business-as-usual? As a companion to Sam Newman’s extremely popular Building Microservices, this new book details a proven method for transitioning an existing monolithic system to a microservice architecture.

With many illustrative examples, insightful migration patterns, and a bevy of practical advice to transition your monolith enterprise into a microservice operation, this practical guide covers multiple scenarios and strategies for a successful migration, from initial planning all the way through application and database decomposition. You’ll learn several tried and tested patterns and techniques that you can use as you migrate your existing architecture.

  • Ideal for organizations looking to transition to microservices, rather than rebuild
  • Helps companies determine whether to migrate, when to migrate, and where to begin
  • Addresses communication, integration, and the migration of legacy systems
  • Discusses multiple migration patterns and where they apply
  • Provides database migration examples, along with synchronization strategies
  • Explores application decomposition, including several architectural refactoring patterns
  • Delves into details of database decomposition, including the impact of breaking referential and transactional integrity, new failure modes, and more

Table of Contents

  1. 1. Splitting the Monolith
    1. To Change The Monolith, Or Not?
      1. Cut, Copy, Or Re-implement?
    2. Migration Patterns
    3. Pattern: Strangler Application
      1. How It Works
      2. Where To Use It
      3. Example: HTTP Proxy
      4. Data?
      5. Proxy Options
      6. Changing Protocols
      7. Example: FTP
      8. Example: Message Interception
      9. Other Protocols
      10. Other Examples Of The Strangler Pattern
    4. Pattern: UI Composition
      1. Example: Page Composition
      2. Example: Widget Composition
      3. Example: Micro Frontends
      4. Where To Use It
    5. Pattern: Branch By Abstraction
      1. How It Works
      2. As A Fallback Mechanism
      3. Where To Use It
    6. Pattern: Decorating Collaborator
      1. Example: Loyalty Program
      2. Where To Use It
    7. Pattern: Change-Data Capture
      1. Example: Issuing Loyalty Cards
      2. Implementing Change Data Capture
      3. Where To Use It
    8. Pattern: Parallel Running
      1. Example: Comparing Credit Derivative Pricing
      2. Example: Real Estate Listing
      3. Verification Techniques
      4. Where to use it
    9. Summary
  2. 2. The Database
    1. Pattern: The Shared Database
      1. Coping Patterns
      2. When To Use It
    2. But it can’t be done!
    3. Pattern: Database View
      1. The Database As A Public Contract
      2. Views To Present
      3. Limitations
      4. Ownership
      5. Where To Use It
    4. Pattern: Database Wrapping Service
      1. When To Use It
    5. Pattern: Database As An Endpoint
      1. Implementing A Mapping Engine
      2. Compared To Views
      3. When To Use It
    6. Transferring Ownership
      1. Pattern: Expose Aggregates From The Monolith
      2. Pattern: Change Data Ownership
    7. Data Synchronization
      1. Pattern: Synchronise Data In Application
    8. Splitting Apart The Database
    9. Splitting The Database First, Or The Code?
      1. Split The Database First
      2. Splitting The Code First
      3. Split Application and Code Together
      4. So, which should I split first?
    10. Schema Separation Examples
    11. Pattern: Move Foreign Key Relationship To Code
      1. Moving The Join
      2. Data Consistency
      3. Where To Use This
      4. Example: Shared Static Data
      5. Pattern: Split Table
    12. Further Reading
    13. Understanding Root Causes
    14. Summary