Professional Documents
Culture Documents
Messaging Patterns: An Alternative Approach To Modeling With ESB's
Messaging Patterns: An Alternative Approach To Modeling With ESB's
Jimmy P
@pjimmy
mail@thejimmyp.com
http://www.blog.thejimmyp.com
Outline
Some Context
Some Problems
Intro to Messaging Systems
Some Solutions
And The Focus
Some Patterns
Platform Temporal
Spatial
Afferent
Efferent
Some diagrams adapted from material by Udi Dahan – The Software Simplist http://www.udidahan.com
Platform Temporal
Spatial
Afferent
Efferent
• AKA interoperability
Spatial
Afferent
Efferent
A B
A Calls B
B Returns
Some diagrams adapted from material by Udi Dahan – The Software Simplist http://www.udidahan.com
Platform Temporal
Spatial
Afferent
Efferent
• Where are the components physically?
Spatial
Afferent
Efferent
Some diagrams adapted from material by Udi Dahan – The Software Simplist http://www.udidahan.com
But it’s also a little about data loss
When Servers Crash
[HTTP] $$ Order
Call 1 of 3
DB
App Tx Call 2 of 3
Critical
Windows Patch
Rollback
Where’s the order!?
Slide courtesy of Udi Dahan – The Software Simplist http://www.udidahan.com
When Databases Are Down
[HTTP] $$ Order
Call 1 of 3
DB
App Tx Call 2 of 3
Exception
Write to log A B
$$ Order
A B C D
Service Service C
A
Service Service D BUS
B
Service E SVC C
Service
C Service F
What makes up a messaging
system
Messages travel between queues
Queues are persistent stores located on the machine the
service is deployed to
Queues can persist messages to non volatile storage in case
of faults
Adding and removing messages from queues can be
transactional
Queues provide us with our asynchronous behavior
So How does messaging help with
coupling?
Platform Temporal
Spatial
Afferent
Efferent
Some diagrams adapted from material by Udi Dahan – The Software Simplist http://www.udidahan.com
Platform Temporal
Spatial
Afferent
Efferent
• Asynchronous messaging
Some diagrams adapted from material by Udi Dahan – The Software Simplist http://www.udidahan.com
Platform Temporal
Spatial
Afferent
Efferent
Some diagrams adapted from material by Udi Dahan – The Software Simplist http://www.udidahan.com
Platform Temporal
Spatial
Afferent
Efferent
Service A Service B
Communications Infrastructure
Some diagrams adapted from material by Udi Dahan – The Software Simplist http://www.udidahan.com
And with data loss?
Messages are transactions
Rollback
$$ Order
Q Tx
Receive
Rollback
Call 1 of 3 DB
App Call 2 of 3
$$ Order
A B C D
Msg
[HTTP]
Messaging
Invoke
Gateway DB
WS
Ultimate in SRP
Publish/Subscribe