links to this page:    
View this PageEdit this PageUploads to this PageHistory of this PageTop of the SwikiRecent ChangesSearch the SwikiHelp Guide
Last updated at 6:33 pm UTC on 3 March 2005
When a node has something to share it thinks might be of general interest to the network, it wants to tell the world. However, we do not want to broadcast around every time we have something to tell.

The AWGPresence class manages this information in a more controlled manner. Local applications announce presence with the peer's 'presence' attribute (instance of AWGPresence). Every n seconds AWGPresence selects a peer and sends it all the deltas it collected, including the ones it received since the last swap from other peers. In effect this is very similar to the peer gossiping, although peer lists are restricted to a small set of peers, and presence information can in theory become very large.

Presence information is divided into presence sets, that each have a name (to please any people that want to move from Java to Squeak, we use reverse domain notation for the names - so presence of AardWorks DGV user policies is in the set 'nl.aardworks.dgv.community.policy'). Each presence set has a lease policy - presence times out, and if no-one refreshes (reconfirms) presence, the presence entry will disappear from the network. Stable stuff (files) should have long leases (typically a day or even more), volatile stuff (user presence) may have leases as short as 5 minutes.

As presence information is sent to all peers, eventually, and (currently) only kept in memory, care should be taken to announce only basic things. For example, one could announce directories to be present; an application protocol could then ask for the files inside the directory as they are needed.

Presence information consists of:
The latter is nice to announce services - our user policy example uses this to announce services by name after endpoint registration; when someone needs to access the policy service a lookup by name can be done, and a random instance of the service can be contacted directly on the indicated origin:endpoint combination (a random instance if more than one is registered - a presence entry is unique on object+origin so duplicate objects will be propagated across the network, nice for redundancy).