Professional Documents
Culture Documents
Evolution of SI, Messaging
Evolution of SI, Messaging
*A client sends a request, but does not wait for the answer.
Hence, the request does not have to be processed immediately.
How Messaging Works?
In messaging, applications do not communicate with each other
directly and do not have a dedicated communication link established
between them - they communicate indirectly through a queue.
send read
network
Application A Application B
create process
send read
network
Elements
Main elements of a messaging system are:
o Queues (channels)
o Messages
o End-points (Sender, Receiver)
Elements - Message
A message consists of a header and a body.
o The header contains meta-information about the message—who
sent it, where it is going, date/time, etc.; this information is used
by the messaging system (MOM) and is mostly ignored by the
applications using the messages.
o The body contains the data being transmitted and is ignored by
the messaging system; the body is used by receiver’s
application. It can be interpreted simply as data, or as the
description of a command to be invoked on the receiver.
Common message types:
o Text Message: most common, the body is a string like a literal text, or an XML
document. Example SOAP/XML message.
o Object Message: the body is a single object, like a Java object.
o Bytes Message: the body is a byte array.
Elements – End Point
End-points (Sender/Producer, Receiver/Consumer) is the part (code)
of the sending/receiving application that is to connect to the
messaging system and to send or receive a message. The rest of
the application uses the end points whenever it needs to send or
receive a message.
Both the Sender and Receiver need the API of the messaging
system (middleware) to be able to:
o Connect to the MOM
o Look up to a (desired) queue*
o Connect to a queue
o Send/receive a message to/from the queue
o Close the connection
Content
Messaging
o Overview
o How/Process
o Elements
Pattern-based message integration
About Patterns
The goal of patterns is to help to make decisions that lead to a good
solution for a specific problem.
Problem: How to design for varying, but related, algorithms or policies? How to
design for the ability to change these algorithms or policies?
<<Interface>>
Sale
ISalePricingStrategy
getTotal() : Double
getTotal(s : Sale) : Double
PercentDiscount ThresholdDiscount
It also helps to
Motivation: message recipient generally does not know nor care which
application put the message on the channel. If we do not know which
application published a message it is difficult to correct a problem with
the message.