TTIPC

Inter-Process Communication (IPC) is an essential abstraction on TTEnsembles for simplifying runtime iteractions in accordance with the three-part formulation of SQs. The ensemble has 3 main processes at runtime: an input token processor TTInputTokenProcess (handles synchronization for SQs), an executor TTExecuteProces (executes the code within an SQ), and network interface/forwarder TTNetworkManager (which tags duplicates tokens and sends them to the ensemble that downstream SQs are mapped to and forwards anything that arrives over the network to the appropriate process).

Each of these has data and control layers, where the data layer is responsible for interpreting the graph that represents the users program; the control/management layer, handles higher level operations for the SQs, such as instantiating or destroying them, or remapping them. Our IPC abstraction helps to distinguish those types of messages. This is very similar to TTNetworkMessage. Note that control messages should seek guaranteed delivery over the network.

Primarily, this file contains enumerations. These enumerations are designators that help self-identify messages with their recipient and function. It is up to the actual processes to read these from the message and respond appropriately.

class ticktalkpython.IPC.ExecuteMsg(value, names=<not given>, *values, module=None, qualname=None, type=None, start=1, boundary=None)

Message types used by the process that handles execution for SQs on tokens, i.e. the TTExecuteProcess

exception ticktalkpython.IPC.FinishedException
class ticktalkpython.IPC.Message(msg_type, payload, process_recipient)

A wrapper for a message that will be sent between processes on an ensemble. This encapsulates the payload, which may be anything (so long as it is serializable) with information that describes which process it is for and how it should be treated.

Parameters:
  • msg_type (SyncMsg | ExecuteMsg | NetMsg | RuntimeMsg) – The message type to describe what the message contains and how it should be handled.

  • payload (Any) – The values carried by the message

  • process_recipient (Recipient) – An enumerated value describing which process should receive this message; typically used for sanity checks, but also to help determine where an IPC message should go when it arrives through the network interface

class ticktalkpython.IPC.NetMsg(value, names=<not given>, *values, module=None, qualname=None, type=None, start=1, boundary=None)

Message types used by the process that handles the network layer and forwarding tokens based on SQ mapping, i.e., the TTNetworkManager

class ticktalkpython.IPC.Recipient(value, names=<not given>, *values, module=None, qualname=None, type=None, start=1, boundary=None)

A description of the process that is meant to receive this message

class ticktalkpython.IPC.RuntimeMsg(value, names=<not given>, *values, module=None, qualname=None, type=None, start=1, boundary=None)

Message types used by the TTRuntimeManagerProcess, which is generally used for setting up the system and graph, but plays little role in the interpretation of the graph (aside from creating initial input tokens)

class ticktalkpython.IPC.SendTokenListMessage(payload, process_recipient, source_sq)
class ticktalkpython.IPC.SyncMsg(value, names=<not given>, *values, module=None, qualname=None, type=None, start=1, boundary=None)

Message types used by the process that handles synchronization for SQs on input tokens, i.e., the TTInputTokenProcess