Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Mastering migrations

Andriy
January 21, 2023

Mastering migrations

Andriy

January 21, 2023
Tweet

More Decks by Andriy

Other Decks in Programming

Transcript

  1. Mastering Migrations
    From Monolith to Microservices with Golden Master Testing

    View Slide

  2. Mastering Migrations
    From Monolith to Microservices with Golden Master Testing

    View Slide

  3. Microservices

    View Slide

  4. Andriy Frankevych
    Software Engineer @ Docebo
    Looking for a better profile picture
    @alsoknownasdrew on the interwebs

    View Slide

  5. Part 1: Why Are
    We Doing This?
    - 1 product
    - 1 dev team
    - 1 system

    View Slide

  6. Part 1: Why Are
    We Doing This?
    - 2 products
    - 1 dev team
    - 1 system

    View Slide

  7. Part 1: Why Are
    We Doing This?
    - 3 products
    - 1 dev team
    - 1 system

    View Slide

  8. Part 1: Why Are
    We Doing This?
    - 3 products
    - 1 dev team
    - 1 system
    - 1 bottleneck

    View Slide

  9. Part 1: Why Are
    We Doing This?
    - 3 products
    - 3 dev teams
    - 1 system

    View Slide

  10. Part 1: Why Are
    We Doing This?
    - 3 products
    - 3 dev teams
    - 1 system

    View Slide

  11. Part 1: Why Are
    We Doing This?
    - 3 products
    - 3 dev teams
    - 1 system
    - 1 bottleneck

    View Slide

  12. Part 1: Why Are
    We Doing This?
    - 3 products
    - 3 dev teams
    - 3 systems

    View Slide

  13. Microservices:
    organizational
    solution

    View Slide

  14. Part 2: What
    Are We Doing?
    - Giant spaghetti script
    - No tests
    - No one knows how it works

    View Slide

  15. Part 2: What
    Are We Doing?
    Identify responsibilities

    View Slide

  16. Part 3: How Are
    We Doing This?
    Record Golden Master

    View Slide

  17. Part 3: How Are
    We Doing This?
    - Run the tests
    - Refactor
    - Run the tests

    View Slide

  18. Part 3: How Are
    We Doing This?
    - Use Adapters

    View Slide

  19. Abstract dependencies:
    you'll be glad you did

    View Slide

  20. Part 3: How Are
    We Doing This?
    - Use Adapters
    - Use Contract Testing

    View Slide

  21. Part 3: How Are
    We Doing This?
    - Use Adapters
    - Use Contract Testing
    - Throw away Golden master

    View Slide

  22. Golden Master:
    refactoring
    solution

    View Slide

  23. Part 4: What's
    next?
    - Use Contract Testing to
    migrate frontend

    View Slide

  24. Part 4: What's
    next?
    - Use Contract Testing to migrate
    frontend
    - Repeat for other services

    View Slide

  25. Thanks
    References:
    - Fred Brooks: The Mythical Man-Month
    - Eric Evans: Domain Driven Design
    - Eberhard Wolff: Microservices
    - Michael Feathers: Working Effectively with Legacy Code
    - Contract testing: stoplight.io | pact.io
    - Slides: https://speakerdeck.com/alsoknownasdrew/mastering-migrations

    View Slide