Application Model : Ports
 
Share this page                  
Ports
Port is a term generically used to describe any input or output of an operator. A given instance of a port is either an input or an output, but never both. Ports, like graphs, can be divided into logical and physical entities.
Logical ports are used to connect operators together in a logical graph by linking the logical output of one operator to the logical input of another.
Physical ports are used in the implementation of an operator to access incoming or outgoing data. A physical port always corresponds to a logical port, but a logical port does not necessarily have a corresponding physical port.
When composing a graph, it is not necessary to connect the logical output ports of an operator to anything. If left unconnected, the data output on the port is discarded during execution. However, an operator must have all its inputs connected during composition or an error will occur on execution. The only exceptions to this rule are optional inputs—when an operator declares a logical input port, it can be marked as optional.
Within DataFlow, ports can be divided into groups based on the type of data moved through them:
A record port represents a stream of records. This is the most common form of port, as most operators consume or produce records. Physical record input ports act like forward-only iterators over the incoming data. Physical record output ports publish data one record at a time.
A model port represents the communication of a single object. Most of the time the object being passed represents a shared model of some sort. Model ports act like standard dataflow variables; they are unset until a writer publishes a value, at which time the value is available for all readers.
Note:  A value can be written to a model output port only once.