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

Embracy legacy

Embracy legacy

An internal talk to the Uniplaces team about architecture

Miguel Loureiro

September 28, 2016
Tweet

More Decks by Miguel Loureiro

Other Decks in Technology

Transcript

  1. Software development done by pr0s Phase 1 Start writing from

    scratch Phase 2 Launch the product Phase 3 Architecture doesn’t scale A new framework came out Whatever nonsense happened
  2. Software development done by pr0s Phase 1 Start writing from

    scratch Phase 2 Launch the product Phase 3 Architecture doesn’t scale A new framework came out Whatever nonsense happened Phase 4 Admit it failed miserably and go back to phase 1
  3. But, and if there’s no rewrite? “Legacy here” “Legacy there”

    “Oh look, legacy!” “Not my fault, legacy”
  4. But, and if there’s no rewrite? “Legacy here” “Legacy there”

    “Oh look, legacy!” “Not my fault, legacy” “Legacy shit...”
  5. But, and if there’s no rewrite? “Legacy here” “Legacy there”

    “Oh look, legacy!” “Not my fault, legacy” “Legacy shit...” “LEGA“Legac y there” CY” “Legacy there” “Legacy there”
  6. Benfica’s legacy Think about this Every year Benfica changes players

    Every once a while Benfica changes administration
  7. Benfica’s legacy Think about this Every year Benfica changes players

    Every once a while Benfica changes administration Benfica has built a new Stadium
  8. Benfica’s legacy Think about this Every year Benfica changes players

    Every once a while Benfica changes administration Benfica built a new Stadium Benfica is constantly changing
  9. The roots LESSONS - “Divide and conquer” - “Break problems

    into smaller problems” - “Separation of Concerns” 25 35
  10. The roots LESSONS - “Divide and conquer” - “Break problems

    into smaller problems” - “Separation of Concerns” 25 35 SCOPES - Problem solving
  11. The roots LESSONS - “Divide and conquer” - “Break problems

    into smaller problems” - “Separation of Concerns” 25 35 SCOPES - Problem solving - Procedural programming
  12. The roots LESSONS - “Divide and conquer” - “Break problems

    into smaller problems” - “Separation of Concerns” 25 35 SCOPES - Problem solving - Procedural programming - OOP
  13. The roots LESSONS - “Divide and conquer” - “Break problems

    into smaller problems” - “Separation of Concerns” 25 35 SCOPES - Problem solving - Procedural programming - OOP - MVC
  14. The roots LESSONS - “Divide and conquer” - “Break problems

    into smaller problems” - “Separation of Concerns” 25 35 SCOPES - Problem solving - Procedural programming - OOP - MVC - DDD
  15. Every single approach on software development tries to split problems

    into smaller problems and to separate concerns.
  16. “It makes perfect sense that when growing the scope to

    architecture / infrastructure we see the rise of solutions using the same basic lessons. Microservices didn’t emerge from nothing, they’re a natural architectural evolution from what we’ve been learning.”
  17. “It makes perfect sense that when growing the scope to

    architecture / infrastructure we see the rise of solutions using the same basic lessons. Microservices didn’t emerge from nothing, they’re a natural architectural evolution from what we’ve been learning.”
  18. History 25 35 CORE :| SPA PHOTO ADMIN AP OPS

    SHARED LIBRARY ( OK! ) 9 NINJAS
  19. History 25 35 SPA PHOTO ADMIN AP OPS ROOT OF

    ALL EVIL! 20+ NINJAS COUPLED ARCHITECTURE CORE
  20. Problems - Team scalability - Missing bounded context (back to

    this later) - Dependency hell - Granular scalability
  21. Problems - Team scalability - Missing bounded context (back to

    this later) - Dependency hell - Granular scalability - Missing isolated development
  22. Problems - Team scalability - Missing bounded context (back to

    this later) - Dependency hell - Granular scalability - Missing isolated development - Slowdown release pipeline
  23. “My general rule of thumb: don’t violate DRY within a

    microservice, but be relaxed about violating DRY across all services. The evils of too much coupling between services are far worse than the problems caused by code duplication”
  24. “My general rule of thumb: don’t violate DRY within a

    microservice, but be relaxed about violating DRY across all services. The evils of too much coupling between services are far worse than the problems caused by code duplication”
  25. We have bounded context with Domain Driven Design We just

    don’t have separate delivery pipelines for each one
  26. On going 25 35 CORE (Monolith) SPA PHOTO ADMIN AP

    OPS ROOT OF ALL EVIL! 20+ NINJAS Auth Rents calculator Pricing calculator Search API Search JOBS
  27. Fully automated releases 1. Merge to master 2. Circle CI

    BUILDS docker image, TAGS it and PUSHES to a private docker registry.
  28. Fully automated releases 1. Merge to master 2. Circle CI

    BUILDS docker image, TAGS it and PUSHES to private docker registry. 3. Update service with the new task definition
  29. The vision 25 35 SPA PHOTO ADMIN AP OPS 500+

    NINJAS Auth Rents calculator Pricing calculator Search API Search JOBS Offers Properties Cities Neighborhoods Communication A B D C D 10+ LANGUAGES MOBILE APP B MOBILE APP A MOBILE APP C MOBILE APP D