SlideShare a Scribd company logo
1 of 65
WEBINARS
is the biggest tech conference for
developers in EMEA, open to all
languages and technologies.
NEXT CONFERENCES
CODEMOTION ROME: March 22-23
CODEMOTION AMSTERDAM: April 2-3
VISIT OUR PLATFORM CODEMOTION.COM
microservices architecture
is it the right choice
to design long-living
systems?
Mauro Servienti
mauroservienti
All I wanna do
when I wake up in
the morning is…
Rosanna, Toto. Toto IV
mauroservienti
Buy a "Banana Protector"
mauroservienti
Buy a "Banana Protector"
mauroservienti
Shopping Cart Microservice
[ list-of ]
- Item ID
- Price
- Quantity
- Inventory
- Name
- Description
Shopping Cart
mauroservienti
please, welcome the
business
mauroservienti
Business requirements (#1)
mauroservienti
Products & Shopping Cart Microservices
[ list-of ]
- Item ID
- Price
- Quantity
- Inventory
- Name
- Description
Shopping Cart
- Item ID
- Price
Products
mauroservienti
Products & Shopping Cart Microservices
[ list-of ]
- Item ID
- Price
- Quantity
- Inventory
- Name
- Description
Shopping Cart
- Item ID
- Price
Products
copy
mauroservienti
Business requirements (#2)
mauroservienti
Products & Shopping Cart Microservices
[ list-of ]
- Item ID
- Price
- Quantity
- Inventory
- Name
- Description
Shopping Cart
- Item ID
- Price
- Inventory
Products
mauroservienti
Products & Shopping Cart Microservices
[ list-of ]
- Item ID
- Price
- Quantity
- Inventory
- Name
- Description
Shopping Cart
- Item ID
- Price
- Inventory
Products
copy
copy
mauroservienti
Business requirements (#3)
mauroservienti
Products & Shopping Cart Microservices
[ list-of ]
- Item ID
- Price
- Quantity
- Inventory
- Name
- Description
Shopping Cart
- Item ID
- Price
- Inventory
Products
mauroservienti
Products & Shopping Cart Microservices
[ list-of ]
- Item ID
- CurrentPrice
- LastPrice
- Quantity
- Inventory
- Name
- Description
Shopping Cart
- Item ID
- Price
- Inventory
Products
mauroservienti
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
service
boundaries
violation
mauroservienti
Price doesn’t feel in the right place
- Item ID
- Price
- Inventory
Products
mauroservienti
ownership
is lost
mauroservienti
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
autonomy?
puff, it’s gone
mauroservienti
HTTP all the rage
because it’s the microservices way
mauroservienti
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
“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
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
temporal
coupling
anyone?
mauroservienti
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
distributed
transactions
over HTTP
mauroservienti
mauroservienti
Messaging
temporal coupling and
distributed transactions
mauroservienti
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
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
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
palliative
alleviates the symptoms
mauroservienti
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
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
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
http://montages.no/2009/09/begrepet-grafisk-likhet/ mauroservienti
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
Let’s focus on the Shopping Cart
[ list-of ]
- Item ID
- CurrentPrice
- LastPrice
- Quantity
- Inventory
- Name
- Description
- Etc…
Shopping Cart
mauroservienti
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
- 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
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
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
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
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
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
What a (micro)service is
the technical authority
for a specific business
capability
All business rules (& data) reside within the service
mauroservienti
Full Vertical Slices
MarketingSales Warehouse Shipping
behavior & databehavior & data behavior & databehavior & data
mauroservienti
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
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
time tyranny
Demo
bit.ly/codemotion-webinar-microservices
mauroservienti
Takeaways
• Boundaries are key to success
• Do not bring in more technology to solve non-
technical problems
mauroservienti
Takeaways
• Boundaries are key to success
• Mental model can badly influence design
• Users/Business analysts tend to think in term
of data presentation
mauroservienti
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
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
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
ViewModel Composition
//milestone.topics.it
you don’t need a distributed system
first rule of distributed systems
mauroservienti
Q&A
Thank you!
mauroservienti

More Related Content

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

070801 value chain and sales model
070801 value chain and sales model070801 value chain and sales model
070801 value chain and sales model
Mark Leslie
 
Supply and Demand in grade12 student PPT.pdf
Supply and Demand in grade12 student PPT.pdfSupply and Demand in grade12 student PPT.pdf
Supply and Demand in grade12 student PPT.pdf
CamiloCantilaSacroJr
 
eCommerce Services by Inovent
eCommerce Services by InoventeCommerce Services by Inovent
eCommerce Services by Inovent
Pradeep Malu
 
Lecture 2 Supply, Demand, and Market Equilibrium.ppt
Lecture 2   Supply, Demand, and Market Equilibrium.pptLecture 2   Supply, Demand, and Market Equilibrium.ppt
Lecture 2 Supply, Demand, and Market Equilibrium.ppt
AhmedFathi516451
 

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

070801 value chain and sales model
070801 value chain and sales model070801 value chain and sales model
070801 value chain and sales model
 
Alex Podopryhora - Selling across multiple channels made easy
Alex Podopryhora - Selling across multiple channels made easyAlex Podopryhora - Selling across multiple channels made easy
Alex Podopryhora - Selling across multiple channels made easy
 
Supply and Demand in grade12 student PPT.pdf
Supply and Demand in grade12 student PPT.pdfSupply and Demand in grade12 student PPT.pdf
Supply and Demand in grade12 student PPT.pdf
 
Retail and Ecommerce Math Essentials - Orkiv
Retail and Ecommerce Math Essentials - OrkivRetail and Ecommerce Math Essentials - Orkiv
Retail and Ecommerce Math Essentials - Orkiv
 
Online shoes business idea report docs
Online shoes business idea report docsOnline shoes business idea report docs
Online shoes business idea report docs
 
IDMS
IDMSIDMS
IDMS
 
IDMS
IDMSIDMS
IDMS
 
Data visualization for e commerce of jcpenney
Data visualization for e commerce of jcpenneyData visualization for e commerce of jcpenney
Data visualization for e commerce of jcpenney
 
Paytm Mall sales report
Paytm Mall sales reportPaytm Mall sales report
Paytm Mall sales report
 
eCommerce Services by Inovent
eCommerce Services by InoventeCommerce Services by Inovent
eCommerce Services by Inovent
 
Paytm Mall sales report
Paytm Mall sales reportPaytm Mall sales report
Paytm Mall sales report
 
Sell your products on TYGA mall
Sell your products on TYGA mallSell your products on TYGA mall
Sell your products on TYGA mall
 
Future of digital publishers
Future of digital publishersFuture of digital publishers
Future of digital publishers
 
Ecommerce Web Design Proposal PowerPoint Presentation Slides
Ecommerce Web Design Proposal PowerPoint Presentation SlidesEcommerce Web Design Proposal PowerPoint Presentation Slides
Ecommerce Web Design Proposal PowerPoint Presentation Slides
 
Warehouse86 Intro Deck
Warehouse86 Intro DeckWarehouse86 Intro Deck
Warehouse86 Intro Deck
 
Refresher Training_Inventory Management.pdf
Refresher Training_Inventory Management.pdfRefresher Training_Inventory Management.pdf
Refresher Training_Inventory Management.pdf
 
Lecture 2 Supply, Demand, and Market Equilibrium.ppt
Lecture 2   Supply, Demand, and Market Equilibrium.pptLecture 2   Supply, Demand, and Market Equilibrium.ppt
Lecture 2 Supply, Demand, and Market Equilibrium.ppt
 
SupplyandDemand.ppt
SupplyandDemand.pptSupplyandDemand.ppt
SupplyandDemand.ppt
 
How to Avoid Over-Optimizing in Product by Trunk Club Sr PM
How to Avoid Over-Optimizing in Product by Trunk Club Sr PMHow to Avoid Over-Optimizing in Product by Trunk Club Sr PM
How to Avoid Over-Optimizing in Product by Trunk Club Sr PM
 
How to Design Retail Recommendation Engines with Neo4j
How to Design Retail Recommendation Engines with Neo4jHow to Design Retail Recommendation Engines with Neo4j
How to Design Retail Recommendation Engines with Neo4j
 

More from Mauro Servienti

More from Mauro Servienti (20)

Welcome to the (state) machine @ ExploreDDD 2019
Welcome to the (state) machine @ ExploreDDD 2019Welcome to the (state) machine @ ExploreDDD 2019
Welcome to the (state) machine @ ExploreDDD 2019
 
Designing a ui for microservices @ .NET Day Switzerland 2019
Designing a ui for microservices @ .NET Day Switzerland 2019Designing a ui for microservices @ .NET Day Switzerland 2019
Designing a ui for microservices @ .NET Day Switzerland 2019
 
Welcome to the (state) machine @ Xe One Day Enterprise Applications
Welcome to the (state) machine @ Xe One Day Enterprise ApplicationsWelcome to the (state) machine @ Xe One Day Enterprise Applications
Welcome to the (state) machine @ Xe One Day Enterprise Applications
 
Be like water, my friend @ Agile for Innovation 2019
Be like water, my friend @ Agile for Innovation 2019Be like water, my friend @ Agile for Innovation 2019
Be like water, my friend @ Agile for Innovation 2019
 
Titles, abstracts, and bio matter... oh my! @ Global Diversity CFP Day 2019
Titles, abstracts, and bio matter... oh my! @ Global Diversity CFP Day 2019Titles, abstracts, and bio matter... oh my! @ Global Diversity CFP Day 2019
Titles, abstracts, and bio matter... oh my! @ Global Diversity CFP Day 2019
 
Living organizations, particular software @ do IT Better Parma
Living organizations, particular software @ do IT Better ParmaLiving organizations, particular software @ do IT Better Parma
Living organizations, particular software @ do IT Better Parma
 
Welcome to the (state) machine @ Crafted Software
Welcome to the (state) machine @ Crafted SoftwareWelcome to the (state) machine @ Crafted Software
Welcome to the (state) machine @ Crafted Software
 
PO is dead, long live the PO - Italian Agile Day 2018
PO is dead, long live the PO - Italian Agile Day 2018PO is dead, long live the PO - Italian Agile Day 2018
PO is dead, long live the PO - Italian Agile Day 2018
 
Design a UI for your Microservices @ Do IT Better
Design a UI for your Microservices @ Do IT BetterDesign a UI for your Microservices @ Do IT Better
Design a UI for your Microservices @ Do IT Better
 
Designing a ui for microservices
Designing a ui for microservicesDesigning a ui for microservices
Designing a ui for microservices
 
Po is dead, long live the po
Po is dead, long live the poPo is dead, long live the po
Po is dead, long live the po
 
Shipping code is not the problem, deciding what to ship it is!
Shipping code is not the problem, deciding what to ship it is!Shipping code is not the problem, deciding what to ship it is!
Shipping code is not the problem, deciding what to ship it is!
 
GraphQL - Where are you from? Where are you going?
GraphQL - Where are you from? Where are you going?GraphQL - Where are you from? Where are you going?
GraphQL - Where are you from? Where are you going?
 
Dall'idea al deploy un lungo viaggio che passa per git flow e semver
Dall'idea al deploy   un lungo viaggio che passa per git flow e semverDall'idea al deploy   un lungo viaggio che passa per git flow e semver
Dall'idea al deploy un lungo viaggio che passa per git flow e semver
 
Progettare una UI per i Microservices
Progettare una UI per i MicroservicesProgettare una UI per i Microservices
Progettare una UI per i Microservices
 
The road to a Service Oriented Architecture is paved with messages
The road to a Service Oriented Architecture is paved with messagesThe road to a Service Oriented Architecture is paved with messages
The road to a Service Oriented Architecture is paved with messages
 
La via verso SOA è lastricata di messaggi
La via verso SOA è lastricata di messaggiLa via verso SOA è lastricata di messaggi
La via verso SOA è lastricata di messaggi
 
Implementare il single sign on con IdentityServer
Implementare il single sign on con IdentityServerImplementare il single sign on con IdentityServer
Implementare il single sign on con IdentityServer
 
How we daily manage and work in a dispersed company: Particular Software
How we daily manage and work in a dispersed company: Particular SoftwareHow we daily manage and work in a dispersed company: Particular Software
How we daily manage and work in a dispersed company: Particular Software
 
From cogs to nirvana
From cogs to nirvanaFrom cogs to nirvana
From cogs to nirvana
 

Recently uploaded

+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
Health
 
%+27788225528 love spells in Knoxville Psychic Readings, Attraction spells,Br...
%+27788225528 love spells in Knoxville Psychic Readings, Attraction spells,Br...%+27788225528 love spells in Knoxville Psychic Readings, Attraction spells,Br...
%+27788225528 love spells in Knoxville Psychic Readings, Attraction spells,Br...
masabamasaba
 
AI Mastery 201: Elevating Your Workflow with Advanced LLM Techniques
AI Mastery 201: Elevating Your Workflow with Advanced LLM TechniquesAI Mastery 201: Elevating Your Workflow with Advanced LLM Techniques
AI Mastery 201: Elevating Your Workflow with Advanced LLM Techniques
VictorSzoltysek
 
%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...
%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...
%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...
masabamasaba
 
%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...
%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...
%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...
masabamasaba
 
Large-scale Logging Made Easy: Meetup at Deutsche Bank 2024
Large-scale Logging Made Easy: Meetup at Deutsche Bank 2024Large-scale Logging Made Easy: Meetup at Deutsche Bank 2024
Large-scale Logging Made Easy: Meetup at Deutsche Bank 2024
VictoriaMetrics
 

Recently uploaded (20)

AI & Machine Learning Presentation Template
AI & Machine Learning Presentation TemplateAI & Machine Learning Presentation Template
AI & Machine Learning Presentation Template
 
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
 
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
 
Crypto Cloud Review - How To Earn Up To $500 Per DAY Of Bitcoin 100% On AutoP...
Crypto Cloud Review - How To Earn Up To $500 Per DAY Of Bitcoin 100% On AutoP...Crypto Cloud Review - How To Earn Up To $500 Per DAY Of Bitcoin 100% On AutoP...
Crypto Cloud Review - How To Earn Up To $500 Per DAY Of Bitcoin 100% On AutoP...
 
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
 
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
 
%in Bahrain+277-882-255-28 abortion pills for sale in Bahrain
%in Bahrain+277-882-255-28 abortion pills for sale in Bahrain%in Bahrain+277-882-255-28 abortion pills for sale in Bahrain
%in Bahrain+277-882-255-28 abortion pills for sale in Bahrain
 
%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfontein
%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfontein%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfontein
%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfontein
 
WSO2CON 2024 - Cloud Native Middleware: Domain-Driven Design, Cell-Based Arch...
WSO2CON 2024 - Cloud Native Middleware: Domain-Driven Design, Cell-Based Arch...WSO2CON 2024 - Cloud Native Middleware: Domain-Driven Design, Cell-Based Arch...
WSO2CON 2024 - Cloud Native Middleware: Domain-Driven Design, Cell-Based Arch...
 
%in Stilfontein+277-882-255-28 abortion pills for sale in Stilfontein
%in Stilfontein+277-882-255-28 abortion pills for sale in Stilfontein%in Stilfontein+277-882-255-28 abortion pills for sale in Stilfontein
%in Stilfontein+277-882-255-28 abortion pills for sale in Stilfontein
 
%in tembisa+277-882-255-28 abortion pills for sale in tembisa
%in tembisa+277-882-255-28 abortion pills for sale in tembisa%in tembisa+277-882-255-28 abortion pills for sale in tembisa
%in tembisa+277-882-255-28 abortion pills for sale in tembisa
 
%in ivory park+277-882-255-28 abortion pills for sale in ivory park
%in ivory park+277-882-255-28 abortion pills for sale in ivory park %in ivory park+277-882-255-28 abortion pills for sale in ivory park
%in ivory park+277-882-255-28 abortion pills for sale in ivory park
 
tonesoftg
tonesoftgtonesoftg
tonesoftg
 
%+27788225528 love spells in Knoxville Psychic Readings, Attraction spells,Br...
%+27788225528 love spells in Knoxville Psychic Readings, Attraction spells,Br...%+27788225528 love spells in Knoxville Psychic Readings, Attraction spells,Br...
%+27788225528 love spells in Knoxville Psychic Readings, Attraction spells,Br...
 
AI Mastery 201: Elevating Your Workflow with Advanced LLM Techniques
AI Mastery 201: Elevating Your Workflow with Advanced LLM TechniquesAI Mastery 201: Elevating Your Workflow with Advanced LLM Techniques
AI Mastery 201: Elevating Your Workflow with Advanced LLM Techniques
 
Harnessing ChatGPT - Elevating Productivity in Today's Agile Environment
Harnessing ChatGPT  - Elevating Productivity in Today's Agile EnvironmentHarnessing ChatGPT  - Elevating Productivity in Today's Agile Environment
Harnessing ChatGPT - Elevating Productivity in Today's Agile Environment
 
Payment Gateway Testing Simplified_ A Step-by-Step Guide for Beginners.pdf
Payment Gateway Testing Simplified_ A Step-by-Step Guide for Beginners.pdfPayment Gateway Testing Simplified_ A Step-by-Step Guide for Beginners.pdf
Payment Gateway Testing Simplified_ A Step-by-Step Guide for Beginners.pdf
 
%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...
%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...
%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...
 
%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...
%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...
%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...
 
Large-scale Logging Made Easy: Meetup at Deutsche Bank 2024
Large-scale Logging Made Easy: Meetup at Deutsche Bank 2024Large-scale Logging Made Easy: Meetup at Deutsche Bank 2024
Large-scale Logging Made Easy: Meetup at Deutsche Bank 2024
 

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

  • 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.
  • 6. microservices architecture is it the right choice to design long-living systems? Mauro Servienti mauroservienti
  • 7. All I wanna do when I wake up in the morning is… Rosanna, Toto. Toto IV mauroservienti
  • 8. Buy a "Banana Protector" mauroservienti
  • 9. Buy a "Banana Protector" mauroservienti
  • 10. Shopping Cart Microservice [ list-of ] - Item ID - Price - Quantity - Inventory - Name - Description Shopping Cart mauroservienti
  • 13. Products & Shopping Cart Microservices [ list-of ] - Item ID - Price - Quantity - Inventory - Name - Description Shopping Cart - Item ID - Price Products mauroservienti
  • 14. Products & Shopping Cart Microservices [ list-of ] - Item ID - Price - Quantity - Inventory - Name - Description Shopping Cart - Item ID - Price Products copy mauroservienti
  • 16. Products & Shopping Cart Microservices [ list-of ] - Item ID - Price - Quantity - Inventory - Name - Description Shopping Cart - Item ID - Price - Inventory Products mauroservienti
  • 17. Products & Shopping Cart Microservices [ list-of ] - Item ID - Price - Quantity - Inventory - Name - Description Shopping Cart - Item ID - Price - Inventory Products copy copy mauroservienti
  • 19. Products & Shopping Cart Microservices [ list-of ] - Item ID - Price - 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 mauroservienti
  • 21. 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
  • 23. Price doesn’t feel in the right place - Item ID - Price - Inventory Products mauroservienti
  • 25. 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
  • 27. HTTP all the rage because it’s the microservices way mauroservienti
  • 28. 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
  • 29. “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
  • 30. 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
  • 32. 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
  • 35. Messaging temporal coupling and distributed transactions mauroservienti
  • 36. 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
  • 37. 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
  • 38. 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
  • 40. 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
  • 41. 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
  • 42. 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
  • 44. 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
  • 45. Let’s focus on the Shopping Cart [ list-of ] - Item ID - CurrentPrice - LastPrice - Quantity - Inventory - Name - Description - Etc… Shopping Cart mauroservienti
  • 46. 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
  • 47. - 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
  • 48. 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
  • 49. 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
  • 50. 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
  • 51. 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
  • 52. 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
  • 53. What a (micro)service is the technical authority for a specific business capability All business rules (& data) reside within the service mauroservienti
  • 54. Full Vertical Slices MarketingSales Warehouse Shipping behavior & databehavior & data behavior & databehavior & data 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 mauroservienti
  • 56. 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
  • 58. Takeaways • Boundaries are key to success • Do not bring in more technology to solve non- technical problems mauroservienti
  • 59. Takeaways • Boundaries are key to success • Mental model can badly influence design • Users/Business analysts tend to think in term of data presentation mauroservienti
  • 60. 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
  • 61. 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
  • 62. 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
  • 64. you don’t need a distributed system first rule of distributed systems mauroservienti

Editor's Notes

  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?