Threads

Processes contain threads, which are single strands of binary within a process. Threads are the basic units used to configure and monitor the system.

Thread types are:

  • Protocol threads are principally responsible for sending and receiving protocol messages on a connection. These communicate with remote host connections and handle protocol-level issues. Because the protocol thread must perform reliably, the message flow and queues inside the thread are tightly coupled with the database recovery states. They also match the protocol, or transfer rules, of each external system:
    • Inbound protocol: These contact the remote host, read the host’s protocol, and pull the original message into the engine.
    • Outbound protocol: These send the completed message out to a remote connection, using the connection’s protocol.
  • Translation threads translate messages between different formats and perform routing between protocol threads.

    All inbound messages transitioned from inbound to outbound states go through the translation thread. The translation thread deals only with engine messages, so there is no protocol driver associated with it.

    The translation thread uses route details to perform the transition from an inbound to outbound state.

  • Command threads schedule flow inside the engine. There is one command thread per process. They also provide options to control the other two thread classes.

    The command thread has these main functions:

    • Scheduling the running of the protocol and translation threads. This is independent of the OS-dependent thread implementation below it.
    • Responding to external commands.

    With this interface, each process command thread can accept commands from both local and remote processes. It can also act directly on some commands, and pass the remaining commands along to other threads in the process.

The thread classes provide a pipeline architecture with each thread focused on its own area of processing within the engine.

For example, because protocol threads deal with protocol-level issues, they do not handle record parsing, message routing, or translation systems.

Multiple processes are handled transparently, so that multiple translations may be performed simultaneously.