Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

Beyond Microservices

1,239 views

Published on

This presentation shows the properties, advantages and challenges of microservices. It then discusses alternative architectures beyond microservices.

Published in: Software
  • Be the first to comment

Beyond Microservices

  1. 1. Beyond Microservices Eberhard Wolff @ewolff http://ewolff.com Fellow
  2. 2. http://continuous-delivery-buch.de/ http://continuous-delivery-book.com/
  3. 3. http://microservices-buch.de/ http://microservices-book.com/
  4. 4. http://microservices-book.com/ primer.html http://microservices-buch.de/ ueberblick.html FREE!!!!
  5. 5. What are Microservices?
  6. 6. Modules Processes Independent Continuous Delivery Pipeline Standardized Operations Resilience Microservices
  7. 7. Why Microservices? !
  8. 8. Technological Benefits "
  9. 9. Decoupling > Originally: Changing a module does not influence other modules. > i.e. independent development
  10. 10. Microservice Decoupling > Independent scaling > Independent technical decisions > Decoupled crashes > Security: firewalls etc
  11. 11. Clean Architecture
  12. 12. Developer
  13. 13. Developer
  14. 14. REST REST
  15. 15. ECommerce System Order Catalog Billing Search
  16. 16. ECommerce System Order Catalog Billing Search
  17. 17. ECommerce System Catalog Billing Search
  18. 18. ECommerce System Order Catalog Billing Search Replace if messed up.
  19. 19. Replaceability > Small components hard to mess up > Each module can be replaced > …small green field project > ...different technology stack possible
  20. 20. Continuous Delivery
  21. 21. Microservices ECommerce System 3rd party systems Database
  22. 22. Microservices 3rd party systems Database Order Catalog Billing Search
  23. 23. Order Billing Customer Commit Stage Automated Acceptance Testing Automated Capacity Testing Manual Explorative Testing Release Commit Stage Automated Acceptance Testing Automated Capacity Testing Manual Explorative Testing Release Commit Stage Automated Acceptance Testing Automated Capacity Testing Manual Explorative Testing Release
  24. 24. Build Pipeline for Microservices > Build pipeline per Microservice > Smaller > Easier to set up > Less features (3rd party systems) > Faster Feedback: Less tests
  25. 25. Decoupled Development Decoupled Scalability Decoupled Technical decisions Decoupled Crashes Security Architecture Firewalls Replaceability Continuous Delivery Technological Benefits
  26. 26. Organizational Benefits "
  27. 27. Deployment Monolith Stories Technical Coordination Coordinating Releases
  28. 28. Microservice Stories Technical Coordination Stories Technical Coordination Stories Technical Coordination Order Billing Search Release Release Release
  29. 29. Inverse Conway Maneuver > Architecture drives organization > Cross-functional team (database, logic, UI) > Team responsible for Bounded Context(s)
  30. 30. Take one huge project and make it several small projects…
  31. 31. Self-organization > With so much independence… > ...teams can decide for themselves. > Self-organization
  32. 32. Inverse Conway Maneuver Independent Technologies Independent Bounded Contexts Self- organization Organizational Benefits
  33. 33. Microservices: Challenges #
  34. 34. Consistency Order Invoice Delivery What about order #42? ✅ ✅ ❌
  35. 35. Consistency Order Invoice Delivery Order #42 is cancelled! ✅ ✅ ⁉ Goods might be delivered if order arrives after cancellation.
  36. 36. This is quite common without microservices.
  37. 37. Customer Order Catalog Domino Effect
  38. 38. Customer Order Catalog Domino Effect
  39. 39. Customer Order Catalog Domino Effect
  40. 40. Customer Order Catalog Domino Effect
  41. 41. Build resilient microservices!
  42. 42. Refactorings > Move code to a new service: Easy > Move code from service to service > Might be a port to a different language > Hard
  43. 43. Global Refactorings > Really hard: Global restructuring > i.e. moving everything to a different place. > …but that is always hard… > ...and the result of a major screwup. > Do you want to optimize for this?
  44. 44. Many New Technologies > Microservices framework > Service discovery > Routing / API Gateway > Continuous Delivery pipeline > Docker > Docker scheduler (Kubernetes) > ....
  45. 45. Challenges Consistency Fail safeness Large scale refactoring New Technologies
  46. 46. Microservices are an all or nothing approach.
  47. 47. Microservices are an all or nothing approach.
  48. 48. Which benefits are important? Which challenges acceptable?
  49. 49. Moving beyond Microservices: Rightsize the achitecture!
  50. 50. Alternative Approaches
  51. 51. Centralized DB
  52. 52. Billing Order Process CRM OrderOrder Order True Microservices
  53. 53. Shared Database Order Schema Billing Order Process CRM
  54. 54. Modules -- Processes ++ Independent Continuous Delivery Pipeline + Standardized Operations - Resilience - Shared Database: Microservices
  55. 55. Decoupled Development -- Decoupled Scalability + Decoupled Technical decisions + Decoupled Crashes + Security - Architecture Firewalls - Replaceability -- Continuous Delivery - Technological Benefits
  56. 56. Inverse Conway Maneuver - Independent Technologies + Independent Bounded Contexts -- Self-organization - Organizational Benefits
  57. 57. Challenges Consistency ++ Fail safeness - Large scale refactoring - New Technologies - -
  58. 58. Centralized Database is a bad idea.
  59. 59. Layered
  60. 60. Layered iOS Android Web Order Product Delivery InvoiceCustomer
  61. 61. Layered: Issues > Changing a business process cause many changes > …in Frontend and many backend > Lots of communication between teams and components
  62. 62. Modules ++ Processes ++ Independent Continuous Delivery Pipeline ++ Standardized Operations ++ Resilience + Microservices
  63. 63. Decoupled Development - Decoupled Scalability - Decoupled Technical decisions ++ Decoupled Crashes + Security + Architecture Firewalls + Replaceability + Continuous Delivery - Technological Benefits
  64. 64. Inverse Conway Maneuver -- Independent Technologies ++ Independent Bounded Contexts -- Self-organization -- Organizational Benefits
  65. 65. Challenges Consistency + Performance -- Fail safeness -- Large scale refactoring -- New Technologies --
  66. 66. Layered: More challenges, less benefits, same effort
  67. 67. Bounded Context Microlith SCS
  68. 68. Order Shipping address Tracking # Items Item Categories Priority shipping Customs # Account # ... Credit card # Order #
  69. 69. My Domain Model is a mess!
  70. 70. Bounded Context > Domain model is only valid for one context > There is no universal data model! > See all failed SOA attempts
  71. 71. Order Shipping address Tracking # Items Item Categories Priority shipping Customs # Account # ... Credit card # Order # Customs Order Recommen- dations Order Tracking Order Shipping address Tracking # Item Categories Priority shipping Customs # Payment Order Account # Credit card #
  72. 72. Self-contained Systems Search Invoice LogisticsCheckout Web Web Web Web See http://scs-architecture.org
  73. 73. Modules ++ Processes ++ Independent Continuous Delivery Pipeline ++ Standardized Operations ++ Resilience + Microservices
  74. 74. Decoupled Development ++ Decoupled Scalability ++ Decoupled Technical decisions ++ Decoupled Crashes ++ Security ++ Architecture Firewalls + Replaceability + Continuous Delivery ++ Technological Benefits
  75. 75. Inverse Conway Maneuver ++ Independent Technologies ++ Independent Bounded Contexts ++ Self-organization ++ Organizational Benefits
  76. 76. Challenges Consistency + Performance ++ Fail safeness ++ Large scale refactoring + New Technologies +
  77. 77. Microservices as they should be.
  78. 78. Modules with Maven Architecture Management OSGi WAR
  79. 79. Build order / Architecture management Build order / Architecture management
  80. 80. Modules + Processes -- Independent Continuous Delivery Pipeline - Standardized Operations ++ Resilience - Microservices
  81. 81. Decoupled Development + Decoupled Scalability -- Decoupled Technical decisions -- Decoupled Crashes -- Security -- Architecture Firewalls ++ Replaceability + Continuous Delivery + Technological Benefits
  82. 82. Inverse Conway Maneuver + Independent Technologies -- Independent Bounded Contexts ++ Self-organization - Organizational Benefits
  83. 83. Challenges Consistency - Performance ++ Fail safeness - Large scale refactoring ++ New Technologies ++
  84. 84. Clean architecture with a lot less technical challenges!
  85. 85. Conclusion
  86. 86. Conclusion > Microservices are a set of architecture decision > Architecture is about trade-offs > Architecture is different for each project > Go beyond microservices by picking the best decisions! > …and gain most benefits
  87. 87. Usually bad tradeoffs > Centralized database > Layered model
  88. 88. Usually good tradeoffs > SCS, Bounded Context, Microlith > Strongly separated modules

×