23.08.2015 Views

Here - Agents Lab - University of Nottingham

Here - Agents Lab - University of Nottingham

Here - Agents Lab - University of Nottingham

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

exchange and storage <strong>of</strong> tuples (key-value pairs) used to associated any piece <strong>of</strong>data (and related meta-information, such as timestamps and MIME types), toa logical key.2.1 Tuples and Meta-TuplesA tuple’s key in PEIS consists <strong>of</strong> two parts: (name, owner) where name is astring key for the tuple, and owner is the address (id) <strong>of</strong> a PEIS responsible forthe tuple.In the most simple scenario for executing a collaboration between components,producers create data in their own tuple space and consumers establishsubscriptions to these tuples to access the data to be used.However, consuming components cannot know in advance from where to readthe data to be used. Meta tuples are a mechanism addressing such a problem ina general way. By using these as inputs it is possible for consumers to read hardcoded meta tuples from their own tuplespace. This corresponds to meta tuplesacting as named input ports in other middleware.To configure such a consumer, a configuration writes the id and key <strong>of</strong> tuplesproduced by any producer. The consumer will then automatically subscribe toand read the data from the producer, as in the following (pseudo-code) example.Producer 42:while (true):setTuple "temperature"

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!