Sugar presence refactor: Difference between revisions
DanWilliams (talk | contribs) (Insert the Shared Activities section header) |
No edit summary |
||
(7 intermediate revisions by 5 users 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: |
||
Line 26: | Line 27: | ||
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. |
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=== |
|||
# Tommy opens a new Web activity. The activity is assigned the UID 12345 by the shell, and is implicitly unpublished. |
# Tommy opens a new Web activity. The activity is assigned the UID 12345 by the shell, and is implicitly unpublished. |
||
# Tommy goes to the "Butterfly Information" page and clicks the "Share with Everyone" button |
# Tommy goes to the "Butterfly Information" page and clicks the "Share with Everyone" button |
||
Line 41: | Line 43: | ||
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. |
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 Mapping=== |
|||
An 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 "<tt>_12345_web_olpc._udp</tt>", any other service from any Buddy that begins with "<tt>_12345_</tt>" is considered to belong to that shared activity. i.e., "<tt>_12345_chat_olpc._udp</tt>" is the group chat for everyone who is "present" in that shared activity. Likewise, "<tt>_12345_voip_olpc._udp</tt>" is the VOIP conference chat for everyone in that shared activity. |
An 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 "<tt>_12345_web_olpc._udp</tt>", any other service from any Buddy that begins with "<tt>_12345_</tt>" is considered to belong to that shared activity. i.e., "<tt>_12345_chat_olpc._udp</tt>" is the group chat for everyone who is "present" in that shared activity. Likewise, "<tt>_12345_voip_olpc._udp</tt>" is the VOIP conference chat for everyone in that shared activity. |
||
[[Category:Developers]] |
|||
[[Category:Messaging ideas]] |
|||
[[Category:Sugar]] |
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. |