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

One night at a METRO depot

One night at a METRO depot

What does actually happen between order submission and goods delivery?
In this talk, we will provide insights into the domain of "Food Service Distribution" and outline how we ended up with our microservice-based solution. Additionally, we want to share our lessons learned from domain design, implementation,
and 24/7 operation of a large microservice platform.

Tobias Neef

March 22, 2018
Tweet

More Decks by Tobias Neef

Other Decks in Programming

Transcript

  1. ONE NIGHT AT A METRO DEPOT HOW TO DELIVER FOOD

    WITH MICROSERVICES Silvia Schreier (METRO / @aivlis_s) Tobias Neef (INNOQ / @tobnee) 22.3.2017 © METRO AG. One night at a METRO depot – How to deliver food with microservices 1
  2. | 22.3.2017 © METRO AG. One night at a METRO

    depot – How to deliver food with microservices 2
  3. | 22.3.2017 © METRO AG. One night at a METRO

    depot – How to deliver food with microservices 4
  4. | 22.3.2017 © METRO AG. One night at a METRO

    depot – How to deliver food with microservices 5
  5. | 22.3.2017 © METRO AG. One night at a METRO

    depot – How to deliver food with microservices 6
  6. | 22.3.2017 © METRO AG. One night at a METRO

    depot – How to deliver food with microservices 7
  7. | 22.3.2017 © METRO AG. One night at a METRO

    depot – How to deliver food with microservices 8
  8. | 22.3.2017 © METRO AG. One night at a METRO

    depot – How to deliver food with microservices 9
  9. | 22.3.2017 © METRO AG. One night at a METRO

    depot – How to deliver food with microservices 10
  10. | 22.3.2017 © METRO AG. One night at a METRO

    depot – How to deliver food with microservices 11
  11. | 22.3.2017 © METRO AG. One night at a METRO

    depot – How to deliver food with microservices 12
  12. | 22.3.2017 © METRO AG. One night at a METRO

    depot – How to deliver food with microservices 13
  13. | 22.3.2017 © METRO AG. One night at a METRO

    depot – How to deliver food with microservices 14
  14. | 22.3.2017 © METRO AG. One night at a METRO

    depot – How to deliver food with microservices 15
  15. | "SO WHAT HAPPENS DURING THE NIGHT?" 22.3.2017 © METRO

    AG. One night at a METRO depot – How to deliver food with microservices 16
  16. | CUSTOMER ORDER FULFILLMENT PROCESS 22.3.2017 © METRO AG. One

    night at a METRO depot – How to deliver food with microservices 17 Order Management Tour Planning Picking Delivery Preparation Loading & Delivery External Picking
  17. | "HOW DID WE SCALE THE DEVELOPMENT OF THIS SOLUTION?"

    22.3.2017 © METRO AG. One night at a METRO depot – How to deliver food with microservices 20
  18. | CUSTOMER ORDER FULFILLMENT PROCESS 22.3.2017 © METRO AG. One

    night at a METRO depot – How to deliver food with microservices 21 Order Management Tour Planning Picking Delivery Preparation Loading & Delivery External Picking
  19. | NAIVE VERTICAL CUT 22.3.2017 © METRO AG. One night

    at a METRO depot – How to deliver food with microservices 22 Order Management Tour Planning Picking Delivery Preparation Loading Delivery Where does the goods/stock come from? How to configure your depot? Who owns the order? What is about master data?
  20. | A CLOSE TO REAL VERTICAL CUT 22.3.2017 © METRO

    AG. One night at a METRO depot – How to deliver food with microservices 23 Order Management (Order Preparation, Exception Handling, Delivery Preparation, Invoicing) Tour & Transport Planning Picking & Packing Loading & Delivery Depot Management (Layout, Stock Management, Labour & Job Management Goods Receiving, Replenishment) Articles Customers ... Merchandising System Till ... Picking & Packing
  21. | 22.3.2017 © METRO AG. One night at a METRO

    depot – How to deliver food with microservices 24
  22. | 22.3.2017 © METRO AG. One night at a METRO

    depot – How to deliver food with microservices 26
  23. | MOBILE PICKING APP 22.3.2017 © METRO AG. One night

    at a METRO depot – How to deliver food with microservices 28
  24. | "WHAT ARE OUR CONSTRAINTS?" 22.3.2017 © METRO AG. One

    night at a METRO depot – How to deliver food with microservices 29
  25. | MARCO ARCHITECTURE CONSTRAINTS • Verticals are expected to run

    in a loosely coupled manner (process and data) • Most infrastructure options are bound to the context of one vertical • Cross vertical communication is done via HTTP • Services are expected to be stateless (with exceptions for caching to some extent) • No code is to be shared between verticals • Verticals are deployed continuously 22.3.2017 © METRO AG. One night at a METRO depot – How to deliver food with microservices 30
  26. | INFRASTRUCTURE CONSTRAINTS • Applications are expected to run in

    a multi DC environment • Services are running on K8s • Applications are deployed as Docker images (handover between the platform and teams) • The provided database is Cassandra and PostgreSQL being on its way • Kafka can be used as a message system / store • Logs and Metrics are shipped and made available for analysis by the platform 22.3.2017 © METRO AG. One night at a METRO depot – How to deliver food with microservices 31
  27. | "HOW DOES THIS NOW CONNECT TO MICRO SERVICES?" 22.3.2017

    © METRO AG. One night at a METRO depot – How to deliver food with microservices 32
  28. | 22.3.2017 © METRO AG. One night at a METRO

    depot – How to deliver food with microservices 33 Pick And Pack Order Mgmt Orders Depot Mgmt Locations Transport Mgmt Shipments Order Mgmt Order Status Depot Mgmt Stock Reduction Driver App SSCCs
  29. | THE INGEST INTEGRATION MODEL © METRO AG. One night

    at a METRO depot – How to deliver food with microservices Pick And Pack Order Mgmt Orders Depot Mgmt Locations Transport Mgmt Shipments Ingest Reporter Reporter Reporter
  30. | External Ingest Kafka Pick & Pack Service Cassandra 22.3.2017

    © METRO AG. One night at a METRO depot – How to deliver food with microservices 35
  31. | CURRENT OPP SERVICES 22.3.2017 © METRO AG. One night

    at a METRO depot – How to deliver food with microservices 36 Ingest Picking Wave Planning Packing Print Zones Worker UI Outbound Monitoring Supervisor UI
  32. | 22.3.2017 © METRO AG. One night at a METRO

    depot – How to deliver food with microservices 37
  33. | MOBILE PICKING APP 22.3.2017 © METRO AG. One night

    at a METRO depot – How to deliver food with microservices 38
  34. | "HOW DO SPAS AND VERTICALS FIT TOGETHER?" 22.3.2017 ©

    METRO AG. One night at a METRO depot – How to deliver food with microservices 39
  35. | OPP ARCHITECTURE SUMMARY • The Vertical is as a

    whole builds a Self-contained System (SCS) • The UI of the vertical should not be shared • The persistence infrastructure we use is used exclusively by the vertical • The vertical should function for some time without other systems being available (replication) • The vertical is owned by one team but others are allowed to do changes • The services of a vertical are hosts to one or more aggregate • References between aggregates happen in the UI or via replication 22.3.2017 © METRO AG. One night at a METRO depot – How to deliver food with microservices 40 http://scs-architecture.org/
  36. | "NO DIGITALIZATION WITHOUT BUSINESS KNOWLEDGE & IT CAPABILITIES" 22.3.2017

    © METRO AG. One night at a METRO depot – How to deliver food with microservices 41
  37. | EVENT STORMING 22.3.2017 © METRO AG. One night at

    a METRO depot – How to deliver food with microservices 42
  38. | "HOW MANY DEVELOPERS FIT INTO A VERTICAL?" 22.3.2017 ©

    METRO AG. One night at a METRO depot – How to deliver food with microservices 43
  39. | "HOW TO MANAGE ARCHITECTURE IN A BIG TEAM?" 22.3.2017

    © METRO AG. One night at a METRO depot – How to deliver food with microservices 44
  40. | "WHEN TO SPLIT UP A VERTICAL?" 22.3.2017 © METRO

    AG. One night at a METRO depot – How to deliver food with microservices 45
  41. | "WE ARE NOT ALONE!" 22.3.2017 © METRO AG. One

    night at a METRO depot – How to deliver food with microservices 47
  42. | 22.3.2017 © METRO AG. One night at a METRO

    depot – How to deliver food with microservices 48 YOU BUILD IT. YOU RUN IT. REALLY?
  43. | "BECOME RESILIENT!" 22.3.2017 © METRO AG. One night at

    a METRO depot – How to deliver food with microservices 49
  44. | 22.3.2017 © METRO AG. One night at a METRO

    depot – How to deliver food with microservices 50 "MONITORING HELPS"
  45. | 22.3.2017 © METRO AG. One night at a METRO

    depot – How to deliver food with microservices 51 Al "ALERTING IS EVEN BETTER"
  46. | "KNOW YOUR SYSTEM" 22.3.2017 © METRO AG. One night

    at a METRO depot – How to deliver food with microservices 52
  47. | "LEARN FROM YOUR MISTAKES" 22.3.2017 © METRO AG. One

    night at a METRO depot – How to deliver food with microservices 53
  48. | ”QUALITY & CONTINUOUS DEPLOYMENT" 22.3.2017 © METRO AG. One

    night at a METRO depot – How to deliver food with microservices 54
  49. | "PREPARE YOUR SYSTEMS AND ORGANIZATION FOR CONTINUOUS IMPROVEMENT" 22.3.2017

    © METRO AG. One night at a METRO depot – How to deliver food with microservices 55
  50. Silvia Schreier Product Owner [email protected] @aivlis_s https://www.metroag.de 22.3.2017 © METRO

    AG. One night at a METRO depot – How to deliver food with microservices 56 Tobias Neef Senior Consultant [email protected] @tobnee https://www.innoq.com