Check out the new USENIX Web site. next up previous
Next: Entity Connection Module Up: Service Architecture Previous: Entity Uniqueness

Entity Management API

The API exported by the EMM consists of join(signature) and leave(signature) primitives which the application calls when it first senses or stops sensing an event signature respectively. The code of the signature is passed as the input parameter to these primitives. For example, if the magnetic signature of a vehicle is sensed, the node calls join(Magnetic). Unlike traditional group communication, the join() does not take a group identifier as input. Instead, it returns as output the identity of the environmental event the application just sensed (i.e., the identity of the entity for which the node was a follower at the time join() was called). If the node is a follower of multiple nodes, a list of identities is returned. The semantics are that the node has joined the respective list of entities. If a node is not a follower of any entity, a new entity is created when join() is called and the code of the new entity is returned.

The EMM also requires the application to implement a handler for an upcall called leader(entity,on_off). The upcall contains an entity id as a parameter as well as a boolean that tells the application that its node has just become or ceased to be leader of the named entity. Application code would typically check whether it is the leader or a member, and execute the corresponding part of its typically distributed data processing algorithm based on the assigned role.

The last part of the API is a store(entity,state) and get(entity,state) call that allows the application on the leader node to save and retrieve persistent state of a named entity. The entity name is passed as input parameter to the call. Typically, the leader would save its state after each iteration. This state is transmitted in the EMM heartbeats to all members of the entity. Upon leader handoff, the new leader would use the above API to get the most recent previously communicated state. It would then resume the iterative application from that point onwards.


next up previous
Next: Entity Connection Module Up: Service Architecture Previous: Entity Uniqueness
root 2003-03-05