Save 37% off PRO during our Black Friday Sale! »

Un monolith microservice ready – Orange Dev Test Days 2018

Un monolith microservice ready – Orange Dev Test Days 2018

Beb422437c1dfb5366f197919e41ac50?s=128

Arnaud LEMAIRE
PRO

October 16, 2018
Tweet

Transcript

  1. Monolith Microservices ready™ @Lilobase

  2. Complexity is non-linear Complexity System size

  3. Distributed doghouse

  4. -Simon Brown « If you can’t build a monolith, what

    makes you think micro-services are the answer ? »
  5. Monolith Microservices -Alvaro Sanchez

  6. -Melvin Conway « organizations which design systems ... are constrained

    to produce designs which are copies of the communication structures of these organizations »
  7. -Simon Brown

  8. -Simon Brown

  9. -Simon Brown 1 2

  10. The problem has never been the monolith, but having a

    single coupled model
  11. Multiple models lives in your application Invoice Catalog Payment Product

    Product Product This is not the same product
  12. The primary coupling in software architecture is when concepts from

    separate contexts are entangled
  13. We usually don’t get our models right on the first

    try. This is where having a single code base & deployment unit helps with the requested refactoring
  14. Let’s create some hard boundaries

  15. Domain domain interface concrete implementation of the domain interface technical

    collaborator
  16. Service A API Service B

  17. Internal API Service A Service B External API Anti-Corruption Layer

    (Belong to the infrastructure)
  18. Facade Parent Injector S1 S2

  19. Facade Parent Injector S1 HTTP
 connector

  20. « Two micro services and their shared database » -Mathias

    Verraes
  21. Messages brokers are also datasources

  22. -Cyrille Dupuydauby « Years of fight against ‘DB as a

    MoM’ anti- pattern have finally paid off: I am now fighting against ‘MoM as a DB’ anti-pattern. »
  23. Events are not created equal Invoice Catalog Payment Inventory

  24. What about processes

  25. Event or Command driven ? Agent Acteur

  26. Orchestration or choreography ? Orchestration Choreography

  27. Exemple of an event driven orchestrated pattern : the macdonald’s

    pattern Counter Ice
 Cream Hamburgers Salads New Order
 —— 
 ——
 —— New Order
 —— 
 ——
 —— New Order
 —— 
 ——
 ——
  28. Counter Ice
 Cream Hamburgers Salads

  29. Counter Ice
 Cream Hamburgers Salads Each time we receive an

    item, we check if the order is complete New Order
 —— 
 ——
 ——
  30. A time bomb for the optimists

  31. -Graham Lea « They can be hard to see, and

    they can sink your app »
  32. Dependencies, even more chances to get failures

  33. Fault tolerance • Rate-limiter • Automatic retry with exponential backoff

    • Response caching • BulkHead pattern • Circuit-breaker • Load Balancing Hystrix, Resilience4j
  34. The micro services iceberg

  35. Distributed transaction

  36. Saga T1 T2 T3

  37. Saga T1 T2 T3 C1 C3

  38. Saga T1 T2 T3 T2 Idempotence

  39. PC PC PC Two phases commits T T T

  40. UI Driven Consistency

  41. -Simon Brown

  42. If you cannot deploy independently your services, you don’t have

    a micro-service architecture
  43. Going further • Applying the Saga Pattern • Caitie McCaffrey

    • Distributed Transactions: The Icebergs of Microservices • Graham Lea • Application Resilience Engineering & Operations at Netflix • Ben Christensen • arpinum/alexandria-api