Static and dynamic stream connections in SPL

There are two types of stream connections in an SPL program that runs in the Teracloud® Streams system: static and dynamic. Static stream connections are required connections. Dynamic stream connections are optional connections.

The following factors define whether streams are dynamic or static:
  • An output stream that is produced by an operator that is directly connected to an Export operator defines a dynamic stream connection.
  • All streams to operators directly connected to the output of an Import operator are dynamic streams.
  • All other streams are defined as static streams.

Behavior of PEs for static stream connections

PEs call the allPortsReady() member function and start processing messages for operators only when all of its static input and output port connections are connected.

When a static output port connection is disconnected, PEs:
  • attempt to reconnect the output port until the PE terminates
  • stops sending messages on the output port until it is reconnected
  • might send messages to other connections on the output port until the PE finds that the connection is disconnected
  • might send messages on other output ports
  • might process messages on input ports

Behavior of PEs for dynamic stream connections

PEs might call the allPortsReady() member function and start processing messages for operators before all of its dynamic input and output port connections are connected.

When a dynamic output port connection is disconnected, PEs:
  • attempt to reconnect the output port until the PE terminates or the connection is removed by a routing update notification
  • continue sending messages to healthy connections while it reconnects to a dynamic connection
  • might skip sending messages to a disconnected connection while it reconnects to a dynamic connection
  • do not report the number of messages, if any, that were lost during reconnecting