decoupled communication
DESCRIPTION
TRANSCRIPT
![Page 1: Decoupled Communication](https://reader034.vdocuments.net/reader034/viewer/2022051411/546c9a14b4af9f662c8b51a0/html5/thumbnails/1.jpg)
Programação de
Sistemas
Distribuidos
Paulo Gandra de Sousa
Mestrado em Engenharia Informática
DEI/ISEP
![Page 2: Decoupled Communication](https://reader034.vdocuments.net/reader034/viewer/2022051411/546c9a14b4af9f662c8b51a0/html5/thumbnails/2.jpg)
Disclaimer
Parts of this presentation are from:
Tannembaum
1
ISEP/IPP
![Page 3: Decoupled Communication](https://reader034.vdocuments.net/reader034/viewer/2022051411/546c9a14b4af9f662c8b51a0/html5/thumbnails/3.jpg)
Today’s lesson
Decoupled communication
Message queueing
Enterprise Service Bus
2
ISEP/IPP
![Page 4: Decoupled Communication](https://reader034.vdocuments.net/reader034/viewer/2022051411/546c9a14b4af9f662c8b51a0/html5/thumbnails/4.jpg)
DECOUPLED
COMMUNICATION
3
ISEP/IPP
![Page 5: Decoupled Communication](https://reader034.vdocuments.net/reader034/viewer/2022051411/546c9a14b4af9f662c8b51a0/html5/thumbnails/5.jpg)
Decoupled communication
What if the receiver is not avaliable?
We need something
Assynchronous and persistent
E.g., voice mail
4
ISEP/IPP
![Page 6: Decoupled Communication](https://reader034.vdocuments.net/reader034/viewer/2022051411/546c9a14b4af9f662c8b51a0/html5/thumbnails/6.jpg)
Persistence and Synchronicity in
Communication (1)
Persistent communication of letters back in the days
of the Pony Express.
![Page 7: Decoupled Communication](https://reader034.vdocuments.net/reader034/viewer/2022051411/546c9a14b4af9f662c8b51a0/html5/thumbnails/7.jpg)
Persistence and Synchronicity in
Communication (2)
a) Persistent asynchronous communication
b) Persistent synchronous communication
2-22.1
![Page 8: Decoupled Communication](https://reader034.vdocuments.net/reader034/viewer/2022051411/546c9a14b4af9f662c8b51a0/html5/thumbnails/8.jpg)
Reliability
Guaranteed delivery in the presence ofnetwork or (receiver) application failures
TCP reliabilibity vs. Reliable Messaging
TCP guarantees that the message iscorrectly delivered if the receiving endpoint is“alive”
Message Queues guarantee delivery even ifthe receiving end is not available withoutextra programming effort
7
ISEP/IPP
![Page 9: Decoupled Communication](https://reader034.vdocuments.net/reader034/viewer/2022051411/546c9a14b4af9f662c8b51a0/html5/thumbnails/9.jpg)
General Architecture of a Message-
Queuing System (1)
The relationship between queue-level addressing
and network-level addressing.
![Page 10: Decoupled Communication](https://reader034.vdocuments.net/reader034/viewer/2022051411/546c9a14b4af9f662c8b51a0/html5/thumbnails/10.jpg)
General Architecture of a Message-
Queuing System (2)
The general organization of a message-queuing
system with routers.
2-29
![Page 11: Decoupled Communication](https://reader034.vdocuments.net/reader034/viewer/2022051411/546c9a14b4af9f662c8b51a0/html5/thumbnails/11.jpg)
Message-Queuing Model
(1)
Four combinations for loosely-coupled communications using
queues.
2-26
![Page 12: Decoupled Communication](https://reader034.vdocuments.net/reader034/viewer/2022051411/546c9a14b4af9f662c8b51a0/html5/thumbnails/12.jpg)
Message-Queuing Model
(2)
Basic interface to a queue in a message-queuing
system.
Primitive Meaning
Put Append a message to a specified queue
GetBlock until the specified queue is nonempty, and remove the first message
PollCheck a specified queue for messages, and remove the first. Never block.
NotifyInstall a handler to be called when a message is put into the specified queue.
![Page 13: Decoupled Communication](https://reader034.vdocuments.net/reader034/viewer/2022051411/546c9a14b4af9f662c8b51a0/html5/thumbnails/13.jpg)
Decouple even more
Message broker
Delivers, and
Translates message formats
14
ISEP/IPP
![Page 14: Decoupled Communication](https://reader034.vdocuments.net/reader034/viewer/2022051411/546c9a14b4af9f662c8b51a0/html5/thumbnails/14.jpg)
Message Brokers
The general organization of a message broker in a message-
queuing system.
2-30
![Page 15: Decoupled Communication](https://reader034.vdocuments.net/reader034/viewer/2022051411/546c9a14b4af9f662c8b51a0/html5/thumbnails/15.jpg)
Enterprise Service Bus
(ESB)
Decouple senders and receivers
Promotes construction of applications
from basic functionality blocks
A way to decouple message format from
publishers and subscribers
Can encode business logic in the bus
itself (ex., process choreography)
20
ISEP/IPP
![Page 16: Decoupled Communication](https://reader034.vdocuments.net/reader034/viewer/2022051411/546c9a14b4af9f662c8b51a0/html5/thumbnails/16.jpg)
ESB
21
ISEP/IPP
http://blogs.msdn.com/fmarasco/archive/2007/07/17/microsoft-esb-guidance.aspx
![Page 17: Decoupled Communication](https://reader034.vdocuments.net/reader034/viewer/2022051411/546c9a14b4af9f662c8b51a0/html5/thumbnails/17.jpg)
ESB
22
ISEP/IPP
http://www.vitria.com/Business_Accelerator/esb.php
![Page 18: Decoupled Communication](https://reader034.vdocuments.net/reader034/viewer/2022051411/546c9a14b4af9f662c8b51a0/html5/thumbnails/18.jpg)
ESB sample app: Loan
Broker
23
ISEP/IPPhttp://mule.mulesource.org/display/MULE/LoanBroker+ESB
![Page 19: Decoupled Communication](https://reader034.vdocuments.net/reader034/viewer/2022051411/546c9a14b4af9f662c8b51a0/html5/thumbnails/19.jpg)
Exercise
Remember the example DS you provided in the last session.
Would it be natural to use reliable messaging?
Would it be natural to use a decoupled architecture?
What about an ESB?
24
ISEP/IPP
![Page 20: Decoupled Communication](https://reader034.vdocuments.net/reader034/viewer/2022051411/546c9a14b4af9f662c8b51a0/html5/thumbnails/20.jpg)
Bibliography
Chapter 2 Tanenbaum
http://en.wikipedia.org/wiki/Loose_coupling
http://en.wikipedia.org/wiki/Message_queue
25
ISEP/IPP