Inspirel banner

Programming Distributed Systems with YAMI4

2 General-Purpose Message Routing

This chapter explains how the meta-information in message headers is used to implement message routing at the level of general-purpose libraries. This information might be of interest to those who need to integrate a system containing programs using general-purpose library with programs using only core components.

At the high level, there are two types of messages: messages (requests) and replies. Both of them are seen by the YAMI low-level infrastructure as just plain messages and their proper interpretation (that is, assignment of replies to corresponding requests) is up to the high-level components. This association is done thanks to the meta-information that is passed in message headers.

Those messages which are requests (they are known as outgoing/incoming messages and are sent from clients to servers) have the following fields in their message headers:

Those messages that are replies (they are sent from servers to clients) have the following fields in their message headers:

Those messages that are rejections (exceptions, sent from servers to clients) have the following fields in their message headers:

In all these cases, message headers are filled in automatically by the library.