Publicité
Publicité

Contenu connexe

Plus de Mauro Servienti(20)

Publicité

Microservices architecture is it the right choice to design long-living systems @ Codemotion Webinar

  1. WEBINARS
  2. is the biggest tech conference for developers in EMEA, open to all languages and technologies.
  3. NEXT CONFERENCES CODEMOTION ROME: March 22-23 CODEMOTION AMSTERDAM: April 2-3
  4. VISIT OUR PLATFORM CODEMOTION.COM
  5. microservices architecture is it the right choice to design long-living systems? Mauro Servienti mauroservienti
  6. All I wanna do when I wake up in the morning is… Rosanna, Toto. Toto IV mauroservienti
  7. Buy a "Banana Protector" mauroservienti
  8. Buy a "Banana Protector" mauroservienti
  9. Shopping Cart Microservice [ list-of ] - Item ID - Price - Quantity - Inventory - Name - Description Shopping Cart mauroservienti
  10. please, welcome the business mauroservienti
  11. Business requirements (#1) mauroservienti
  12. Products & Shopping Cart Microservices [ list-of ] - Item ID - Price - Quantity - Inventory - Name - Description Shopping Cart - Item ID - Price Products mauroservienti
  13. Products & Shopping Cart Microservices [ list-of ] - Item ID - Price - Quantity - Inventory - Name - Description Shopping Cart - Item ID - Price Products copy mauroservienti
  14. Business requirements (#2) mauroservienti
  15. Products & Shopping Cart Microservices [ list-of ] - Item ID - Price - Quantity - Inventory - Name - Description Shopping Cart - Item ID - Price - Inventory Products mauroservienti
  16. Products & Shopping Cart Microservices [ list-of ] - Item ID - Price - Quantity - Inventory - Name - Description Shopping Cart - Item ID - Price - Inventory Products copy copy mauroservienti
  17. Business requirements (#3) mauroservienti
  18. Products & Shopping Cart Microservices [ list-of ] - Item ID - Price - Quantity - Inventory - Name - Description Shopping Cart - Item ID - Price - Inventory Products mauroservienti
  19. Products & Shopping Cart Microservices [ list-of ] - Item ID - CurrentPrice - LastPrice - Quantity - Inventory - Name - Description Shopping Cart - Item ID - Price - Inventory Products mauroservienti
  20. Products & Shopping Cart Microservices [ list-of ] - Item ID - CurrentPrice - LastPrice - Quantity - Inventory - Name - Description Shopping Cart - Item ID - Price - Inventory Products Is item XYZ in a cart? Swap & Insert Prices Move to Saved for… Update XYZ Price mauroservienti
  21. service boundaries violation mauroservienti
  22. Price doesn’t feel in the right place - Item ID - Price - Inventory Products mauroservienti
  23. ownership is lost mauroservienti
  24. Suppliers & Products & Shopping Cart [ list-of ] - Item ID - CurrentPrice - LastPrice - Quantity - Inventory - Name - Description Shopping Cart - Item ID - Price - Inventory Products Is item XYZ in a cart? Swap & Insert Prices Move to Saved for… - Supplier ID - Item ID - Purchase Price Suppliers Update XYZ Price Are we selling? New Purchase Price mauroservienti
  25. autonomy? puff, it’s gone mauroservienti
  26. HTTP all the rage because it’s the microservices way mauroservienti
  27. Suppliers & Products & Shopping Cart [ list-of ] - Item ID - CurrentPrice - LastPrice - Quantity - Inventory - Name - Description Shopping Cart - Item ID - Price - Inventory Products Is item XYZ in a cart? Swap & Insert Prices Move to Saved for… - Supplier ID - Item ID - Purchase Price Suppliers Update XYZ Price Are we selling? New Purchase Price mauroservienti
  28. “the microservices way” Shopping CartProducts Is item XYZ in a cart? Swap & Insert Prices Move to Saved for… Suppliers Update XYZ Price Are we selling? New Purchase Price • Incoming “external” HTTP Post • HTTP Query from Suppliers to Products • HTTP Post from Suppliers to Products • HTTP Query from Products to Shopping Cart • HTTP Post from Products to Shopping Cart mauroservienti
  29. The snowball effect [ list-of ] - Item ID - CurrentPrice - LastPrice - Quantity - Inventory - Name - Description Shopping Cart - Item ID - Price - Inventory Products Is item XYZ in a cart? Swap & Insert Prices Move to Saved for… - Supplier ID - Item ID - Purchase Price Suppliers Update XYZ Price Are we selling? New Purchase Price Ooops... mauroservienti
  30. temporal coupling anyone? mauroservienti
  31. The snowball effect: can we rollback? [ list-of ] - Item ID - CurrentPrice - LastPrice - Quantity - Inventory - Name - Description Shopping Cart - Item ID - Price - Inventory Products Is item XYZ in a cart? Swap & Insert Prices Move to Saved for… - Supplier ID - Item ID - Purchase Price Suppliers Update XYZ Price Are we selling? New Purchase Price Ooops... mauroservienti
  32. distributed transactions over HTTP mauroservienti
  33. mauroservienti
  34. Messaging temporal coupling and distributed transactions mauroservienti
  35. The snowball effect [ list-of ] - Item ID - CurrentPrice - LastPrice - Quantity - Inventory - Name - Description Shopping Cart - Item ID - Price - Inventory Products Is item XYZ in a cart? Swap & Insert Prices Move to Saved for… - Supplier ID - Item ID - Purchase Price Suppliers Update XYZ Price Are we selling? New Purchase Price Ooops... mauroservienti
  36. The snowball effect [ list-of ] - Item ID - CurrentPrice - LastPrice - Quantity - Inventory - Name - Description Shopping Cart - Item ID - Price - Inventory Products - Supplier ID - Item ID - Purchase Price Suppliers New Purchase Price + new price details Business Logic Purchase Price Changed + new price details Business Logic Sell Price Changed MovetoSavedfor… mauroservienti
  37. The snowball effect [ list-of ] - Item ID - CurrentPrice - LastPrice - Quantity - Inventory - Name - Description Shopping Cart + new price details Business Logic Sell Price Changed MovetoSavedfor… Ooops... mauroservienti
  38. palliative alleviates the symptoms mauroservienti
  39. Queries are still a thing: Add item to cart. [ list-of ] - Item ID - Price - Quantity - Inventory - Name - Description Shopping Cart - Item ID - Price - Inventory Products copy price copy inventory mauroservienti
  40. Data sharing is still a thing [ list-of ] - Item ID - CurrentPrice - LastPrice - Quantity - Inventory - Name - Description Shopping Cart + new price details Business Logic Sell Price Changed MovetoSavedfor… mauroservienti
  41. We’re flooding the system… Shopping CartProducts Is item XYZ in a cart? Swap & Insert Prices Move to Saved for… Is item XYZ in a cart? Update XYZ inventory Is item XYZ in a cart? Swap & Insert Prices Move to Saved for… Is item XYZ in a cart? Update XYZ inventory Is item XYZ in a cart? Swap & Insert Prices Move to Saved for… Is item XYZ in a cart? Update XYZ inventory Is item XYZ in a cart? Swap & Insert Prices Move to Saved for… Is item XYZ in a cart? Update XYZ inventory Is item XYZ in a cart? Swap & Insert Prices Move to Saved for… Is item XYZ in a cart? Update XYZ inventory Is item XYZ in a cart? Swap & Insert Prices Move to Saved for… Is item XYZ in a cart? Update XYZ inventory Is item XYZ in a cart? Swap & Insert Prices Move to Saved for… Is item XYZ in a cart? Update XYZ inventory Is item XYZ in a cart? Swap & Insert Prices Move to Saved for… Is item XYZ in a cart? Update XYZ inventory Is item XYZ in a cart? Swap & Insert Prices Move to Saved for… Is item XYZ in a cart? Update XYZ inventory Is item XYZ in a cart? Swap & Insert Prices Move to Saved for… Is item XYZ in a cart? Update XYZ inventory Is item XYZ in a cart? Swap & Insert Prices Move to Saved for… Is item XYZ in a cart? Update XYZ inventory Is item XYZ in a cart? Swap & Insert Prices Move to Saved for… Is item XYZ in a cart? Update XYZ inventory Update XYZ Price Update XYZ Inventory Over and over, and over, and over… mauroservienti
  42. http://montages.no/2009/09/begrepet-grafisk-likhet/ mauroservienti
  43. User mental model is misleading [ list-of ] - Item ID - CurrentPrice - LastPrice - Quantity - Inventory - Name - Description Shopping Cart - Item ID - Price - Inventory Products - Supplier ID - Item ID - Purchase Price Suppliers mauroservienti
  44. Let’s focus on the Shopping Cart [ list-of ] - Item ID - CurrentPrice - LastPrice - Quantity - Inventory - Name - Description - Etc… Shopping Cart mauroservienti
  45. Sales shopping cart [ list-of ] - Item ID - Quantity - Inventory - Name - Description - Delivery Est. Shopping Cart - Item ID - Price Sales [ list-of ] - Item ID - CurrentPrice - LastPrice - Quantity mauroservienti
  46. - Item ID - Price Sales [ list-of ] - Item ID - CurrentPrice - LastPrice - Quantity Warehouse shopping cart [ list-of ] - Item ID - Quantity - Name - Description - Delivery Est. Shopping Cart [ list-of ] - Cart ID - Item ID - Inventory - Quantity Warehouse - Item ID - Inventory mauroservienti
  47. Shipping shopping cart [ list-of ] - Item ID - Quantity - Name - Description Shopping Cart [ list-of ] - Cart ID - Item ID - Quantity - Delivery Est. - Item ID - Price Sales [ list-of ] - Item ID - CurrentPrice - LastPrice - Quantity [ list-of ] - Cart ID - Item ID - Inventory - Quantity Warehouse - Item ID - Inventory - Item ID - Delivery Type Shipping mauroservienti
  48. Marketing tends to be stable [ list-of ] - Item ID - Quantity Shopping Cart [ list-of ] - Cart ID - Item ID - Quantity - Delivery Est. - Item ID - Price - Item ID - Name - Description Marketing Sales [ list-of ] - Item ID - CurrentPrice - LastPrice - Quantity [ list-of ] - Cart ID - Item ID - Inventory - Quantity Warehouse - Item ID - Inventory - Item ID - Delivery Type Shipping mauroservienti
  49. Do we need the Shopping Cart at all? [ list-of ] - Item ID - Quantity Shopping Cart [ list-of ] - Cart ID - Item ID - Quantity - Delivery Est. - Item ID - Price - Item ID - Name - Description Marketing Sales [ list-of ] - Item ID - CurrentPrice - LastPrice - Quantity [ list-of ] - Cart ID - Item ID - Inventory - Quantity Warehouse - Item ID - Inventory - Item ID - Delivery Type Shipping mauroservienti
  50. Can Sales be responsible for that concept? [ list-of ] - Cart ID - Item ID - Quantity - Delivery Est. - Item ID - Price - Item ID - Name - Description Marketing Sales Cart ID [ list-of ] - Item ID - CurrentPrice - LastPrice - Quantity [ list-of ] - Cart ID - Item ID - Inventory - Quantity Warehouse - Item ID - Inventory - Item ID - Delivery Type Shipping mauroservienti
  51. We followed the coupling [ list-of ] - Cart ID - Item ID - Quantity - Delivery Est. - Item ID - Price - Item ID - Name - Description Marketing Sales Cart ID [ list-of ] - Item ID - CurrentPrice - LastPrice - Quantity [ list-of ] - Cart ID - Item ID - Inventory - Quantity Warehouse - Item ID - Inventory - Item ID - Delivery Type Shipping mauroservienti
  52. What a (micro)service is the technical authority for a specific business capability All business rules (& data) reside within the service mauroservienti
  53. Full Vertical Slices MarketingSales Warehouse Shipping behavior & databehavior & data behavior & databehavior & data mauroservienti
  54. Full Vertical Slices MarketingSales Warehouse Shipping behavior & databehavior & data behavior & databehavior & data UI & ViewModel Composition UI & ViewModel Composition UI & ViewModel Composition UI & ViewModel Composition mauroservienti
  55. Full Vertical Slices MarketingSales Warehouse Shipping behavior & databehavior & data behavior & databehavior & data UI & ViewModel Composition UI & ViewModel Composition UI & ViewModel Composition UI & ViewModel Composition Dedicated Technology / FX Dedicated Technology / FX Dedicated Technology / FX Dedicated Technology / FX mauroservienti
  56. time tyranny Demo bit.ly/codemotion-webinar-microservices mauroservienti
  57. Takeaways • Boundaries are key to success • Do not bring in more technology to solve non- technical problems mauroservienti
  58. Takeaways • Boundaries are key to success • Mental model can badly influence design • Users/Business analysts tend to think in term of data presentation mauroservienti
  59. Takeaways • Boundaries are key to success • Mental model can badly influence design • Do not name things prematurely • Premature names stick and drive data aggregation mauroservienti
  60. Takeaways • Boundaries are key to success • Mental model can badly influence design • Do not name things prematurely • Behaviors define how to aggregate data • Group data that change together and that influence each other • Use anti-requirements techniques to validate data grouping • Follow the coupling mauroservienti
  61. Takeaways • Boundaries are key to success • Mental model can badly influence design • Do not name things prematurely • Behaviors define how to aggregate data • Use messaging to temporally decouple services mauroservienti
  62. ViewModel Composition //milestone.topics.it
  63. you don’t need a distributed system first rule of distributed systems mauroservienti
  64. Q&A Thank you! mauroservienti

Notes de l'éditeur

  1. G’day everyone and welcome to this webinar that is part of Codemotion Codemotion is the multichannel platform that helps developers in their professional growth
  2. Codemotion is the biggest tech conference for developers in EMEA, open to all languages and technologies. Codemotion also organizes many events for developers, such as tech meetups, webinars, hackathons, and training courses
  3. these are the upcoming Codemotion conferences.
  4. A few months the Codemotion online platform was launched
  5. Here is a sneak preview of the Codemotion Platform, where you can find articles, videos of events, interviews, and webinars. Shall we get started?
  6. How is this thing designed?
  7. I’m a remote worker I enjoy going to work by bike And I enjoy bananas as lunch breaks Bike riding and bananas in the backpack are not a great idea, so…
  8. Price cannot unexpectedly change while an item is in the cart
  9. Price cannot unexpectedly change while an item is in the cart
  10. distributed monolith
  11. distributed monolith
  12. distributed monolith
  13. At Cart Item Add time
  14. Deploy time
  15. Again, not technical, but look at it from a business perspective. What is the responsibility of a service?
Publicité