Python 7.0pl5 Electronic Accessory User Manual


 
71
Message Exchange
The features of the service agent framework may be used standalone within a single process or across
a set of connected processes. That is, use of the service agent framework is not dependent on a process
being able to connect to a central message exchange process. When combined with the HTTP servlet
framework and RPC over HTTP interface, a single process may be more than adequate for many ap-
plications, especially simple web based services.
If such a service starts to out grow the bounds of a single process however, the application can easily
be split up across multiple processes or machines. This will enable services to be distributed based on
load or proximity to required resources. Being able to split up the application in this way is also ad-
vantageous in that it becomes easier to introduce into the application distinct components which are
written in C++ as opposed to Python.
Unlike most message oriented middleware packages, there is no dedicated message exchange process.
Instead, the components relating to client and server aspects of the mechanism for implementing a dis-
tributed service agent framework are directly accessible. This means that it is possible to take an ex-
isting application and embed within it a message exchange server endpoint. Growing your application
then becomes a simple matter of creating new processes which incorporate a message exchange client
endpoint and have it connect to your original application.
The major classes in the OSE C++ class library used to provide this functionality are the
OTC_Exchange, OTC_InetClient and OTC_InetListener classes. Note that the Python in-
terface only provides the ability to create connections between processes which make use of the INET
socket protocol. When the C++ interface is used directly, on a UNIX platform there is also the option
of using the UNIX socket protocol.