uf:totam
Differences
This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
| uf:totam [2020/04/28 19:41] – adding elisag | uf:totam [2021/09/24 10:49] (current) – [Creating a tuplespace and tuples] elisag | ||
|---|---|---|---|
| Line 29: | Line 29: | ||
| TOTAM has been implemented in AmbientTalk. The system library shipped with AmbientTalk contains the TOTAM implementation under at/ | TOTAM has been implemented in AmbientTalk. The system library shipped with AmbientTalk contains the TOTAM implementation under at/ | ||
| + | ==== Creating a Tuplespace and Tuples ==== | ||
| In order to use TOTAM, you need to load the library and create a TOTAM tuple space as follows: | In order to use TOTAM, you need to load the library and create a TOTAM tuple space as follows: | ||
| Line 37: | Line 38: | ||
| </ | </ | ||
| - | A description can be passed in the '' | + | A description can be passed in the '' |
| + | |||
| + | To create a tuple or a template | ||
| < | < | ||
| // a “hallo” message tuple from wolf. | // a “hallo” message tuple from wolf. | ||
| Line 46: | Line 49: | ||
| def msgTuples := tuple: [" | def msgTuples := tuple: [" | ||
| </ | </ | ||
| + | |||
| + | |||
| + | ==== Adding and Reading Tuples ==== | ||
| TOTAM provides operations to add and read tuples from the tuple space as follows: | TOTAM provides operations to add and read tuples from the tuple space as follows: | ||
| Line 84: | Line 90: | ||
| Note that the network facilities are disabled by default, so before injecting something in the network, the '' | Note that the network facilities are disabled by default, so before injecting something in the network, the '' | ||
| - | A tuple injected | + | ==== Tuple' |
| + | |||
| + | Similar to TOTA, public tuples are replicated and shared amongst devices when devices come into communication range. We thus say that tuple are propagated into the //TOTAM network//, i.e. a logical network formed by all devices which host a TOTAM tuple space. The spread of tuples into the TOTAM network can be controlled by means of a propagation protocol. Each tuple injected | ||
| < | < | ||
| Line 101: | Line 109: | ||
| </ | </ | ||
| - | However, other propagation protocols can be created and attached to a tuple before being injected in the network as follows: | + | Custom |
| < | < | ||
| Line 116: | Line 124: | ||
| </ | </ | ||
| - | The '' | + | The '' |
| < | < | ||
| - | // sends an antituple to notify the removal of this tuple. | + | // cancels the propagation of the tuple to new devices in the TOTAM network. |
| + | publication.cancel(); | ||
| + | // sends an antituple to notify the removal of this tuple in devices which carry a copy. | ||
| publication.retract(); | publication.retract(); | ||
| </ | </ | ||
| - | Upon a '' | + | Upon a '' |
| + | Upon a '' | ||
| < | < | ||
| - | Note that '' | + | Note that '' |
| </ | </ | ||
uf/totam.1588095681.txt.gz · Last modified: by elisag
