Channels

Channels are the means by which Proclets communicate. Being autonomous, Proclets share no data structures directly. Therefore, if their transitions are to synchronise, it must be by means of exchanging messages. This is what Channels do. They accept messages, and store them permanently, so the recipient can use them to make decisions.

In order to achieve this, the messages have to be of a certain form; a Performative described in the 2001 paper.

Proclets defines this Performative type, but the Channel API is such that you don’t have to explicitly create them yourself. However it is useful to understand their structure because it enables powerful interactions and protocols.

You can ask a Channel to respond to incoming messages by giving them.

class proclets.channel.Channel(maxlen=None)

Information is only available locally, hence synchronization can only occur at a channel.

Describing behaviour of Processes with Many-to-Many Interactions. Fahland (2019)

qsize(uid, party=None)int

Return the number of items in the channel.

empty(uid, party=None)bool

Return True if the channel is empty, False otherwise.

Performatives

types.Performative (pkg, description, metadata, paths, interludes)