uf:totam
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revisionNext revisionBoth sides next revision | ||
uf:totam [2009/11/18 15:10] – adding elisag | uf:totam [2014/03/19 12:28] – cfscholl | ||
---|---|---|---|
Line 1: | Line 1: | ||
- | ===== Tuples | + | ====== Scoped |
- | TOTAM is a communication abstraction to enable pervasive social interactivity: | + | TOTAM is tuple space model geared towards mobile ad hoc networks which provides |
- | The basic communications API of the framework provides means to address | + | TOTAM adopts features |
- | However, communicating | + | In TOTAM, tuple spaces are annotated |
- | Instead, we have designed | + | The novelty |
- | ==== Design | + | ===== Motivation ===== |
- | We have reused the concepts developed by | + | [[http:// |
+ | These propagation rules are crucial to provide programmers with a flexible mechanism to achieve context-awareness based not only on connectivity but also on semantic information. | ||
- | The original idea was to build a framework similar to TOTA to be able to exchange and percolate guanotes. Tota proposes relying on distributed | + | However, in TOTA tuples |
- | TOTAM has been designed to be independent from service discovery. So, Guanotes will also have to implement some glue codeto plug in the discovery mechanism of Urbiflock (via Flockr). | + | ===== Scoped Tuples for the Ambient ===== |
- | ==== API ==== | + | TOTAM provides the programmer with means to scope the tuples themselves, i.e the tuples can dynamically adjust their scope as they hop from location to location. By means of tuple space descriptors, |
- | Here comes the public interface | + | {{: |
+ | |||
+ | Figure above illustrates how a scoped tuple is propagated through | ||
+ | |||
+ | |||
+ | ===== API ===== | ||
+ | |||
+ | TOTAM has been implemented in AmbientTalk. The system library shipped with AmbientTalk contains the TOTAM implementation under at/ | ||
+ | |||
+ | |||
+ | In order to use TOTAM, you need to load the library and create a TOTAM tuple space as follows: | ||
< | < | ||
- | makeTupleSpace() | + | import / |
- | makeTuple(tupleID) | + | def myTupleSpace := makeTupleSpace(); |
- | extendTuple: tuple with: closure | + | </ |
+ | |||
+ | A description can be passed in the '' | ||
+ | < | ||
+ | // a “hallo” message tuple from wolf. | ||
+ | def halloTuple | ||
+ | // a template for message tuples from wolf. | ||
+ | def wolfTuples := tuple: [" | ||
+ | // a template for any message tuples. | ||
+ | def msgTuples := tuple: [" | ||
</ | </ | ||
- | A tuple space (ts) in AmbientTota basically consists of a local ts, an ambient ts (to inject | + | TOTAM provides operations |
< | < | ||
- | // tota operations | + | // add tuple to tuple space |
- | def add(tuple) | + | myTupleSpace.out(halloTuple); |
- | def delete(template) -> vector with the deleted | + | // get a Message tuple |
- | matching the template | + | def aMessageTuple := myTupleSpace.rdp(msgTuples); |
- | def read(template) -> vector with the matching tuples | + | // get all Message |
+ | def messageTuples := myTupleSpace.rdg(msgTuples); | ||
+ | </code> | ||
- | // | + | The '' |
- | def inject(tuple) | + | Note that these operations are non-blocking. The'' |
- | // places a listener on to the local TS ( ~ subscribe in TOTA) | + | < |
- | // it returns a publication object to be able to unsusbscribe | + | myTupleSpace.goOnline(); |
- | when: template matches:{ | tuple | | + | myTupleSpace.inject: halloTuple; |
- | // code | + | </code> |
- | } | + | |
- | //Templates are currently boolean expressions on tuples. | + | |
- | Example of template applied to guanotes: | + | |
- | { |guanote| | + | |
- | //methods belonging to the propagation protocol | + | Note that the network facilities are disabled by default, so before injecting something in the network, the '' |
- | // notifies | + | A tuple injected to the network carries |
- | // and starts | + | |
- | def notifyTSDiscovered(ts) | + | < |
- | // notifies the arrival of tuples from a ts | + | def defaultPropagationProtocol(){ |
- | // receive | + | isolate: { |
- | def receiveTyples(tuples) | + | //receiver-side protocol |
+ | def decideEnter(ts) { true }; | ||
+ | def doAction(ts){}; | ||
+ | def changeTupleContent(ts){self}; | ||
+ | def decideStore(ts) {true}; | ||
+ | //sender-side protocol | ||
+ | def inScope(senderDescriptor, | ||
+ | def decideDie(ts){false}; | ||
+ | }; | ||
+ | }; | ||
</ | </ | ||
- | A tuple in our system is just the object contained in a local TS offering the following API to propagate itself: | + | However, other propagation protocols can be created and attached to a tuple before being injected |
< | < | ||
- | // called in every tuple at pass() | + | //define a new propagation protocol |
- | def decidePropagation() -> boolean | + | def blueProtocol := propagationProtocol: |
- | // specifies operations on the local TS | + | def inScope(senderDescriptor, |
- | def doAction | + | receiverDescriptor.team == " |
- | // specifies operations on the tuple itself | + | }; |
- | def changeTupleContent() -> tuple | + | // attach |
- | // if true -> note gets added to local TS | + | def aBlueTuple := tuple: [" |
- | def decideStore () -> boolean | + | withPropagationProtocol: |
- | // if true -> tuple gets unexported and deleted from local TS. | + | // inject the tuple to the network |
- | //new operation not in TOTA | + | def publication := inject: aBlueTuple; |
- | def decideDie() -> boolean | + | |
</ | </ | ||
- | decideDie() is there for discontinuous decidePropagation functions. for example, tuples that should be only propagated every Tuesday could not implemented with TOTA because | + | The '' |
+ | |||
+ | < | ||
+ | // sends an antituple to notify the removal of this tuple. | ||
+ | publication.retract(); | ||
+ | </ | ||
+ | |||
+ | In order to notify the removal of a tuple, TOTAM sends an antituple for the removed tuple. For every tuple there is (conceptually) a unique antituple with the same format and content, but with a different sign. All tuples injected by an application have positive sign while their antituples have a negative sign. Whenever a tuple and its antituple are stored | ||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | ===== Further Reading ===== | ||
+ | |||
+ | **TOTAM: Scoped Tuples for the Ambient**, C. Scholliers, E. Gonzalez Boix, W. De Meuter. Proceedings of the Second International DisCoTec Workshop on Context-aware Adaptation Mechanisms for Pervasive and Ubiquitous Services (CAMPUS 2009), from Electronic Communications of the EASST, eds. 2009. | ||
+ | ([[ http:// | ||
+ | |||
+ | Note: The paper above and this webpage may have differ in the syntax for TOTAM. This webpage |
uf/totam.txt · Last modified: 2021/09/24 10:49 by elisag