the road to a service oriented architecture (soa)
TRANSCRIPT
The road to a Service Oriented
Architectureis paved with a message based infrastructure
Mauro ServientiSolution Architect @ Particular Software, makers of NServiceBus
[email protected]@mauroservienti
All I want to do when I wake up in the morning is…(cit. Rosanna, Toto, Toto IV)
Tickets web site
Buy a ticket
Stage dive… :-)
All what they want to do is…
Display available ticketsReserve with the theater
Charge my credit card
Deal with insuranceShip tickets
Deal with their stuff
Sometimes order is important…
Sometimes not
spot the
ISSUE
Multiple resources --
Multiple owners
Transaction boundaries• user perspective: single operation• ticketing system perspective: multiple operations
• That should be “atomic”
• The business TX crosses multiple boundaries• Theater reservation• Credit card• Insurance• Shipping• Internal stuff
• End we’ll end up in a…
…big ball of mud…When crossing service boundarieswe cannot expect
transactions to work
SOABoundariesare explicit
DTC forget you must
Compensation you should welcome
Idempotency your best friend is
Messages you wantMessages are
AtomicMessages are
UniqueEasily implements
Ledgersemantic
Messaging PatternsBecause not all communication is born equal
Request/Response
message sent to someone
implies some coupling
we know each other
Pub/Sub
broadcasted event, in the past
implies less coupling
subscribers know the publisher
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
Messages in a nutshell• Less coupling• respect your boundaries
• No temporal coupling• messages are asynchronous
• Much less maintenance/deployment headaches• autonomous components
• Easy scale-out• competing consumers
• Guaranteed delivery• with error management
Do you want more?
Free e-book available at:
http://go.particular.net/cloudconfE
Thank youGo! SOA-fy your world