Channels
Channels are the atomic connectors in Reo. A channel is a
medium of communication with exactly two ends. A channel can connect
two components or be composed with other channels using Reo nodes to
build more complex connectors.
A channel has exactly two directed ends. There are two types of
channel ends: source and sink (terminology). An source channel end accepts
data into its channel. A sink channel end dispenses data out of its
channel.
Channel types
- Synchronous - the I/O operations on both ends of
a synchronous channel succeed only atomically (i.e., we can imagine
they succeed simultaneously). An I/O operation on one channel end is
delayed until it can succeed simultaneously with an I/O operation on
the other channel end.
- Asynchronous - the I/O operations performed on
the channel ends of an asynchronous channel may or may not succeed
simultaneously. The success of an I/O operation at one of the channel
ends may exclude the possibility of an I/O operation to simultaneously
succeed at its other end.
- Buffered - the channel has a bounded or an
unbounded buffer to hold data.
- Ordered - a buffered channel that imposes a
certain order on the delivery of its buffer contents, (e.g., FIFO,
STACK, etc.).
- Lossy - a channel that delivers only some of the
data items it receives and loses the rest.
- Spout - a channel that creates and delivers
data.