Sugar presence refactor: Difference between revisions
m (re-categorization) |
No edit summary |
||
(One intermediate revision by the same user not shown) | |||
Line 1: | Line 1: | ||
{{Deprecated |Current information is available at [[Presence Service]] and [[Activity sharing]].}} |
|||
{{OLPC}} |
|||
==Capabilities== |
==Capabilities== |
||
Sugar's presence service should provide the following information to Activities: |
Sugar's presence service should provide the following information to Activities: |
Latest revision as of 11:35, 13 June 2008
CapabilitiesSugar's presence service should provide the following information to Activities:
The presence service should handle all details of gathering buddy presence information, and allow individual Activities to access that information through a fairly simple, straightforward API layered on top of Avahi and dbus. It should also provide the means by which Activities advertise their presence to other laptops. StructureThe presence service will provide a few objects:
ImplementationFor the moment, the presence service will be a python module that is private to each Activity. In the future it will likely be a dbus service merged into the shell. Only one presence service object will be initialized in any given Activity through use of singletons. Presence is merely a layer on top of Avahi that provides a more useful abstraction to Activities. Since with Avahi/ZeroConf, there is no concept of service "owners," it is up to the Presence service to determine which published services are owned by the same Buddy/laptop/child. We're doing this right now by simple name matching and IP address checking in the mDNS records, but this is quite easy to spoof and should be changed later to a more robust scheme. Shared Activities are activities in which a resource is common to more than one child/laptop. This is accomplished through mutual advertisement of the same mDNS service. The Sharing Process
By default, the PresenceService will only alert its client Activity of services that the client activity cares about. When the activity starts the PresenceService, it registers its UID with the PresenceService, and the PS will then filter all services through both the activity's UID and the service types the activity requests to be tracked. Service Advertisement MappingAn mDNS service advertisement is considered to belong to the Shared Activity as long as it contains the UID of the shared activity in its service type. For example, given a shared activity with a service type of "_12345_web_olpc._udp", any other service from any Buddy that begins with "_12345_" is considered to belong to that shared activity. i.e., "_12345_chat_olpc._udp" is the group chat for everyone who is "present" in that shared activity. Likewise, "_12345_voip_olpc._udp" is the VOIP conference chat for everyone in that shared activity. |