|
OpenMOM
messages
OpenMOM messages are used for transferring data (up
to 2 GB for the object encapsulated in a message) among services.
The services concerned may be performed on different
machines or different operating systems,
and may have been developed in different languages.
No special development effort is needed to convert, encode, or decode
the data transmitted by a message. This data
may be of simple, structured types, or arrays. They will
be converted by OpenMOM. And, when a service receives a message,
an automatic check is made between the data expected and the data
received.
When
a message is sent, the profile of a set of destination services
is stipulated. This profile may designate a single, identified service,
but it may also represent a set of services corresponding to given
criteria.
When a message reaches a server, a copy of it is sent to each service
that might be able to process it. The original message has a property
determining the maximum number of copies that can be processed (i.e.
mailed and delivered to the addressee). The original message is
called the seed message.
There
is an acknowledgement mechanism so
the sender can know if a message has actually been delivered. Except
in cases of synchronous processing (synchronous message sending
or local performance of a service), this is not an acknowledgement
of message delivery, and even less of message processing.
Messages in a distributed system do not all have the same importance.
Some must absolutely be processed, while others may be lost without
any major consequences to the good working order of the applications.
So it is possible to qualify a message as being persistent,
in which case the seed message will remain available on the server
as long as the maximum number of copies has not yet been made of
it, and as long as it has not been explicitly cleared, so that each
new service connecting to the server and corresponding to the message
addressee profile will receive a copy of it. The messages can be
saved on disk, to be sure they will be restored if the server shuts
down.
To
recover the messages meant for a given service, a message profile
is given. This profile may designate a single, identified message,
or a set of messages, or all the messages posted. If more than one
message is a candidate, the oldest of them is selected.
You
can also ask for a message envelope containing a set of messages,
and then decide which message to get.

Each
language's API manages the data conversion to or from the OpenMOM
generated format, for structured data (objects, arrays of objects)
conversion is done in the following ways:
-pre-processing
for compiled languages
-
Dynamic conversion for interpreted languages.
-OpenMOM
will identify the type mismatches between senders and receivers.
|