Messaging

Infor Lawson Core Technology provides a messaging layer to facilitate bidirectional communication among the components participating in a transaction, including the requesting client, LATM, LA-RTS, and the RDBMS.

Messaging is implemented in a client-server model. A client requests a service by sending a message to a server. For example, a database utility program might request that a database driver respond to a database query or perform a database update. In response to a request from a client, the server returns a message back to the client, indicating the status of the requested operation and including any data that were requested in the message from the client.

Message Queues

Message queues notify a process of an inbound message. Each component in a transaction (requesting client, LATM, LA-RTS, and the RDBMS) has a dedicated message queue.

Shared Memory

When a client transaction is initiated, the MDBS allocates a pool of message queues and a pool of shared memory in order to transfer data among processes. Because shared memory is a faster mechanism for sharing data between processes than a message queue, the bulk of a message is placed in shared memory. The message queue is used to send an event to the receiving process, telling it that its shared memory is ready to be processed.

Because only client applications request such data transfers, the MDBS allocates the same number of shared memory segments as client message queues.

Each shared memory segment has an associated semaphore, managed by the operating system, that the MDBS uses to ensure mutually exclusive access to the segment. The semaphore is also used by the MDBS to manage shared memory segment allocation in the face of process failures. The semaphore allows the system to recapture shared memory segments that may still appear to be in use by a process that has crashed, and so on.

Note: "Semaphore" is an industry-standard term for a type of variable that contains the status of a shared resource, in this case, a shared memory segment, and, "locks" the resource while it is being used by one resource to prevent conflicts with other resources. Typically, processes that need to make use of a resource check its semaphore for status before making a request.

When the user application signals a driver-space process by posting a message to the message queue, it includes in the message a value that identifies the shared memory segment associated with the message. The driver uses this value to map the shared memory segment into its process.

The diagram that follows is a repeat visual representation of the message queues and shared memory segments that are created during a LATM / LA-RTS process.

Illustration: LATM processing components