SlideShare a Scribd company logo
Microservice: SOA e DDD alla
massima potenza
The road to a
Service Oriented Architecture is paved with a
message based infrastructure
Mauro Servienti
Solution Architect @ Particular Software, makers of NServiceBus
mauro.servienti@particular.net
@mauroservienti
Microsoft MVP / Visual C#
All I want to do when I
wake up in the morning
is…
(cit. Rosanna, Toto, Toto IV)
TicketOne
un biglietto
Stage dive… :-)
Tutto quello che loro
vogliono è…
Mostrarmi i biglietti
Prenotare il posto
Farmi pagare
Assicurare i biglietti
Spedire
Gestire la loro “roba”
In alcuni casi
l’ordine è
importante…
in altri no…
trovate
l’inghippo
Risorse diverse
--
Diversi “owner”
“Transaction boundaries”
• Dal punto di vista utente: una singola operazione
• Dal punto di vista del sistema: operazioni multiple
• Che dovrebbero essere “atomic”
• La Transazione di Business varca molti confini
• Dialogo con il teatro per bloccare I posti
• La carta di credito
• L’assicurazione dei biglietti
• La spedizione
• La “roba” interna
• Alla fine finisce sempre in una…
…big ball of mud…Quando attraversiamo
dei confini non
possiamo pretendere
che le transazioni
funzionino
SOA
Boundaries
are explicit
Il DTC dimenticare dobbiamo
La compensazione accettare
idempotenza il nostro miglior amico
Messages you want
Messages are
Atomic
Messages are
Unique
Easily implements
Ledger
semantic
Messaging Patterns
Perché non tutta la comunicazione nasce uguale…
Request/Response
Messaggio a qualcuno
Implica accoppiamento
Ci conosciamo
Pub/Sub
Evento, passato, pubblicato
Meno accoppiamento
Se ti interessa sai chi pubblica
Tickets reservation
service
Tickets reservation
service
Order management
service
Order management
service
Tickets reservation
service
Credit Card service
Marketing service
Other stuff
Buy ticket
Charge Card
Ticket reserved
Reserve Tickets
Demo
Riepilogo
• Meno accoppiamento, zero è impossibile
• Se rispettate I confini
• Nessun accoppiamento temporale
• I messaggi sono asincorni
• Molti meno mal di testa: manutenzione e deploy
• Componenti autonomi
• Scale-out facile
• “competing consumers”
• Consegna garantita
• Con gestione degli errori
Microservices
My 2 cents…
Una cagata pazzesca…  (cit.)
Possiamo
chiamare quello
che abbiamo visto
microservice?
Il problema è:
possiamo chiamare
qualsiasi cosa
microservice
microservice
confonde
design e deploy
Curiosi?
Free e-book available at:
http://go.particular.net/Liguria
Grazie
Andate e SOA-ificate il mondo :-)

More Related Content

Viewers also liked

Metriche per finanziare il cambiamento
Metriche per finanziare il cambiamentoMetriche per finanziare il cambiamento
Metriche per finanziare il cambiamento
XPeppers
 
Code metrics
Code metricsCode metrics
Code metrics
Klab
 
On working in Particular
On working in ParticularOn working in Particular
On working in Particular
Mauro Servienti
 
Il cielo è sempre più azure
Il cielo è sempre più azureIl cielo è sempre più azure
Il cielo è sempre più azure
Klab
 
Keep calm and deploy
Keep calm and deployKeep calm and deploy
Keep calm and deploy
Klab
 
Croce e delizia del lavoro remoto
Croce e delizia del lavoro remotoCroce e delizia del lavoro remoto
Croce e delizia del lavoro remoto
Mauro Servienti
 
Universal app ma universal per davvero
Universal app ma universal per davveroUniversal app ma universal per davvero
Universal app ma universal per davvero
Klab
 
There is a bot for that
There is a bot for thatThere is a bot for that
There is a bot for that
Klab
 
Approccio prestazionale antincendio nelle caserme
Approccio prestazionale antincendio nelle casermeApproccio prestazionale antincendio nelle caserme
Approccio prestazionale antincendio nelle caserme
Marcello Mangione
 
Microservice vs. Monolithic Architecture
Microservice vs. Monolithic ArchitectureMicroservice vs. Monolithic Architecture
Microservice vs. Monolithic Architecture
Paul Mooney
 

Viewers also liked (10)

Metriche per finanziare il cambiamento
Metriche per finanziare il cambiamentoMetriche per finanziare il cambiamento
Metriche per finanziare il cambiamento
 
Code metrics
Code metricsCode metrics
Code metrics
 
On working in Particular
On working in ParticularOn working in Particular
On working in Particular
 
Il cielo è sempre più azure
Il cielo è sempre più azureIl cielo è sempre più azure
Il cielo è sempre più azure
 
Keep calm and deploy
Keep calm and deployKeep calm and deploy
Keep calm and deploy
 
Croce e delizia del lavoro remoto
Croce e delizia del lavoro remotoCroce e delizia del lavoro remoto
Croce e delizia del lavoro remoto
 
Universal app ma universal per davvero
Universal app ma universal per davveroUniversal app ma universal per davvero
Universal app ma universal per davvero
 
There is a bot for that
There is a bot for thatThere is a bot for that
There is a bot for that
 
Approccio prestazionale antincendio nelle caserme
Approccio prestazionale antincendio nelle casermeApproccio prestazionale antincendio nelle caserme
Approccio prestazionale antincendio nelle caserme
 
Microservice vs. Monolithic Architecture
Microservice vs. Monolithic ArchitectureMicroservice vs. Monolithic Architecture
Microservice vs. Monolithic Architecture
 

More from Mauro Servienti

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
Mauro Servienti
 
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
Mauro Servienti
 
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
Mauro Servienti
 
All our aggregates are wrong @ NDC Copenhagen 2019
All our aggregates are wrong @ NDC Copenhagen 2019All our aggregates are wrong @ NDC Copenhagen 2019
All our aggregates are wrong @ NDC Copenhagen 2019
Mauro Servienti
 
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
Mauro Servienti
 
Microservices architecture is it the right choice to design long-living syste...
Microservices architecture is it the right choice to design long-living syste...Microservices architecture is it the right choice to design long-living syste...
Microservices architecture is it the right choice to design long-living syste...
Mauro Servienti
 
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
Mauro Servienti
 
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
Mauro Servienti
 
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
Mauro Servienti
 
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
Mauro Servienti
 
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
Mauro Servienti
 
Microservices and pineapple on pizza what do they have in common - dos and ...
Microservices and pineapple on pizza   what do they have in common - dos and ...Microservices and pineapple on pizza   what do they have in common - dos and ...
Microservices and pineapple on pizza what do they have in common - dos and ...
Mauro Servienti
 
All our aggregates are wrong (ExploreDDD 2018)
All our aggregates are wrong (ExploreDDD 2018)All our aggregates are wrong (ExploreDDD 2018)
All our aggregates are wrong (ExploreDDD 2018)
Mauro Servienti
 
Designing a ui for microservices
Designing a ui for microservicesDesigning a ui for microservices
Designing a ui for microservices
Mauro Servienti
 
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
Mauro Servienti
 
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!
Mauro Servienti
 
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?
Mauro Servienti
 
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
Mauro Servienti
 
Progettare una UI per i Microservices
Progettare una UI per i MicroservicesProgettare una UI per i Microservices
Progettare una UI per i Microservices
Mauro Servienti
 
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
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
 
All our aggregates are wrong @ NDC Copenhagen 2019
All our aggregates are wrong @ NDC Copenhagen 2019All our aggregates are wrong @ NDC Copenhagen 2019
All our aggregates are wrong @ NDC Copenhagen 2019
 
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
 
Microservices architecture is it the right choice to design long-living syste...
Microservices architecture is it the right choice to design long-living syste...Microservices architecture is it the right choice to design long-living syste...
Microservices architecture is it the right choice to design long-living syste...
 
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
 
Microservices and pineapple on pizza what do they have in common - dos and ...
Microservices and pineapple on pizza   what do they have in common - dos and ...Microservices and pineapple on pizza   what do they have in common - dos and ...
Microservices and pineapple on pizza what do they have in common - dos and ...
 
All our aggregates are wrong (ExploreDDD 2018)
All our aggregates are wrong (ExploreDDD 2018)All our aggregates are wrong (ExploreDDD 2018)
All our aggregates are wrong (ExploreDDD 2018)
 
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
 

SOA, DDD e microservices

Editor's Notes

  1. Welcome Shall we start? what about lunch