User Tools

Site Tools


uf:totam

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision Both sides next revision
uf:totam [2020/04/28 19:41]
elisag adding
uf:totam [2021/09/24 10:41]
elisag update of protocols
Line 84: Line 84:
 Note that the network facilities are disabled by default, so before injecting something in the network, the ''goOnline()'' method must be called on the tuple space. Note that the network facilities are disabled by default, so before injecting something in the network, the ''goOnline()'' method must be called on the tuple space.
  
-tuple injected to the network carries the following default propagation protocol.+==== Tuple's Propagation Protocol ==== 
 + 
 +Similar to TOTA, when devices come into communication range, tuples are replicated and shared amongst devices part of the TOTAM system. The propagation of tuples in the ``TOTAM network'' can be controlled by propagation protocols. Each tuple injected into the network carries a propagation protocol that can be customized by developers. What follows shows the default propagation protocol.
  
 <code> <code>
Line 101: Line 103:
 </code> </code>
  
-However, other propagation protocols can be created and attached to a tuple before being injected in the network as follows:+Custom propagation protocols can be created and attached to a tuple before being injected in the network as follows:
  
 <code> <code>
Line 116: Line 118:
 </code> </code>
  
-The ''propagationProtocol:'' operation creates a propagation protocol object which extends the default propagation protocol object with other semantics. this sample code shows a protocol based on the operational sketch figure that checks whether the receiver of the tuple is part of the blue team. This is attached to the tuple by means of the ''tuple:withPropagationProtocol:'' operation which is then injected into the network. The inject: operation returns a publication object which can be used as follows to remove the tuple from the network.+The ''propagationProtocol:'' operation creates a propagation protocol object which extends the default propagation protocol object with other semantics. this sample code shows a protocol based on the operational sketch figure that checks whether the receiver of the tuple is part of the blue team. This is attached to the tuple by means of the ''tuple:withPropagationProtocol:'' operation which is then injected into the network. The ''inject:'' operation returns a publication object which understands two methods:  
  
 <code> <code>
-// 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();
 </code> </code>
  
-Upon a ''retract'' operation, TOTAM injects in the network 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 in the same tuple space, they immediately annihilate one another, i.e. they both get removed from the tuple space. By means of antituples, TOTAM can “unsend” tuples injected to the network.+Upon a ''cancel'' operation, TOTAM stops the injection of the tuple into newly discovered devices in the TOTAM network.  
 +Upon a ''retract'' operation, TOTAM injects in the TOTAM network an antituple for the removed tuple. For every tuplethere 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 in the same tuple space, they immediately annihilate one another, i.e. they both get removed from the tuple space. By means of antituples, TOTAM can “unsend” tuples injected into the network.
  
  
 <note> <note>
-Note that ''retract'' is meant to be used by the creator of a tuple to stop the propagation of a tuple and remove it from the network. This is useful in cases that tuples injected carry outdate information. However, this operation should not be confused with the ''when:in:'' operation which allows applications to read and remove a tuple matching a template from the TOTAM network. +Note that ''retract'' is meant to be used by the creator of a tuple to stop the propagation of a tuple and remove it from the network. This is useful in cases that tuples injected carry outdate information. However, this operation should **not** be confused with the ''when:in:'' operation which allows applications to read and remove a tuple matching a template from the TOTAM network. 
 </note> </note>
  
uf/totam.txt · Last modified: 2021/09/24 10:49 by elisag