]>
OLPC-specific properties, version 1.0 Properties for the Activity and Buddy abstractions used in the One Laptop per Child's Sugar environment. Copyright (c) 2007 Collabora Limited. This document may be distributed under the same terms as the Telepathy specification. proto-olpc1.0 ProtoXEP Extension Standards Telepathy project XMPP Core XEP-0045 XEP-proto-clique NOT YET ASSIGNED Simon McVittie simon.mcvittie@collabora.co.uk simon.mcvittie@collabora.co.uk 0.0.1 2007-10-01 smcv

First draft.

This document describes the protocol used to transfer OLPC-specific buddy (contact) and activity (chat room) information.

The OLPC Sugar environment has the abstractions of a Buddy (corresponding to a child and/or their laptop (XO), represented in XMPP by a JID and in link-local XMPP by a _presence._tcp record) and an Activity (corresponding to a shared activity, represented in XMPP by a MUC and in link-local XMPP by a llmuc chatroom). The API requires that various properties can be browsed for (without joining any activities or chatrooms).

Buddy properties are published in PEP. As currently implemented, all XOs subscribe to the presence and buddy properties of all other XOs on the same server.

The buddy properties currently supported are ip4-address, key and color.

10.0.0.123 Base64Base64... #005FE4,#00A0FF ]]>

Subscribers receive the change notification, as usual for PEP. (For all the other PEP nodes described in this document, the process is the same, and has been omitted from this document for conciseness.)

10.0.0.123 Base64Base64... #005FE4,#00A0FF ]]>

In link-local XMPP, none of this happens. Instead, the ip4-address property is implicitly available, and the key and color properties are encoded in the _presence._tcp TXT record.

The 'color' property is mapped to the 'olpc-color' TXT record key:

11111@xo-12-34-56._presence._tcp.local. IN TXT "olpc-color=#005FE4,#00A0FF"

The 'key' property is mapped to the 'olpc-key-part0', 'olpc-key-part1', ... properties, split as necessary to fit in the 255-byte limit for TXT records. Because mDNS TXT records are 8-bit-clean, the segments contain raw binary rather than the Base64 binary used in XMPP:

11111@xo-12-34-56._presence._tcp.local. IN TXT "olpc-key-part0=binarybinary..." 11111@xo-12-34-56._presence._tcp.local. IN TXT "olpc-key-part1=binarybinary..." 11111@xo-12-34-56._presence._tcp.local. IN TXT "olpc-key-part2=binarybinary..."

(As currently implemented, the "raw binary" is in fact *also* Base64, so the data seen in XMPP is doubly Base64'd. However, this is not guaranteed to remain the case, so the protocols need to assume the underlying byte array for the key can contain anything.)

Implementors must be careful to ensure that there is no key in the TXT record for the key segment 1 greater than the last one they need (in this case, olpc-key-part3 must be removed if present).

The Neighbourhood view on the OLPC groups XO icons by their current activity, so XOs must notify each other of current-activity changes.

As currently implemented, this is done for both public and private activities, which represents an information leak. (FIXME)

Note that the 'type' attribute is in fact the activity ID; the name is for historical reasons.

room="aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa@conference.jabber.laptop.org" type="aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"/> ]]>

In link-local XMPP, the current activity is mapped to a pair of keys in the TXT record: olpc-current-activity (the activity ID) and olpc-current-activity-room (the Salut rMulticast chat room name).

11111@xo-12-34-56._presence._tcp.local. IN TXT "olpc-current-activity=aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" 11111@xo-12-34-56._presence._tcp.local. IN TXT "olpc-current-activity-room=aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"

For activities to be handled by the Sugar environment, certain properties are needed. Because there is no server-side storage corresponding to a chat room and accessible by all participants, participants each publish the properties of all their activities.

To keep participants' idea of the activity properties in sync, when the properties change, the participant making the change MUST send a broadcast message to the chatroom, notifying other participants of the new properties.

This <message/> MUST be sent before updating the PEP node with the activity properties.

to='aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa@conference.jabber.laptop.org'> org.laptop.Connect Connect Activity #005FE4,#00A0FF 0 ]]>

For public activities, the participants all announce all their activities and their properties in a PEP node.

When an activity becomes private, the participants all delete it from their activity-properties PEP nodes.

org.laptop.Connect Connect Activity #005FE4,#00A0FF 0 org.laptop.HelloMesh Example Activity #005FE4,#00A0FF 0 ]]>

The participants all announce all their list of activities in yet another PEP node, for backwards compatibility. This mechanism will be removed in a future version of this protocol.

Note that again, the 'type' attribute is in fact the activity ID; the name is for historical reasons.

]]>

In link-local XMPP, the activity properties are mapped to the _olpc-activity1._udp record. Each participant in each public activity publishes an mDNS service named chatroomname:publishedname@hostname, like so:

; Advertised by 11111... aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa:11111@xo-12-34-56._olpc-activity1._udp.local. IN SRV 0 xo-12-34-56.local. _olpc-activity1._udp.local. IN PTR aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa:11111@xo-12-34-56._olpc-activity1._udp.local. aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa:11111@xo-12-34-56._olpc-activity1._udp.local IN TXT "txtvers=0" aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa:11111@xo-12-34-56._olpc-activity1._udp.local IN TXT "room=aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa:11111@xo-12-34-56._olpc-activity1._udp.local IN TXT "activity-id=aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa:11111@xo-12-34-56._olpc-activity1._udp.local IN TXT "name=Connect Activity" aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa:11111@xo-12-34-56._olpc-activity1._udp.local IN TXT "color=#005FE4,#00A0FF" aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa:11111@xo-12-34-56._olpc-activity1._udp.local IN TXT "type=org.laptop.ConnectActivity" aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa:11111@xo-12-34-56._olpc-activity1._udp.local IN TXT "tags=" bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb:11111@xo-12-34-56._olpc-activity1._udp.local. IN SRV 0 xo-12-34-56.local. _olpc-activity1._udp.local. IN PTR bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb:11111@xo-12-34-56._olpc-activity1._udp.local. bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb:11111@xo-12-34-56._olpc-activity1._udp.local IN TXT "txtvers=0" bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb:11111@xo-12-34-56._olpc-activity1._udp.local IN TXT "room=bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb" bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb:11111@xo-12-34-56._olpc-activity1._udp.local IN TXT "activity-id=bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb" bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb:11111@xo-12-34-56._olpc-activity1._udp.local IN TXT "name=Example Activity" bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb:11111@xo-12-34-56._olpc-activity1._udp.local IN TXT "color=#005FE4,#00A0FF" bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb:11111@xo-12-34-56._olpc-activity1._udp.local IN TXT "type=org.laptop.HelloMesh" bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb:11111@xo-12-34-56._olpc-activity1._udp.local IN TXT "tags=" ; Advertised by 22222... - suppose here that 22222... is in the activity ; aaaaa... but not in bbbbb... aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa:22222@xo-22-22-22._olpc-activity1._udp.local. IN SRV 0 xo-22-22-22.local. _olpc_activity._udp.local. IN PTR aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa:22222@xo-22-22-22._olpc-activity1._udp.local. aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa:22222@xo-22-22-22._olpc-activity1._udp.local IN TXT "txtvers=0" aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa:22222@xo-22-22-22._olpc-activity1._udp.local IN TXT "room=aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa:22222@xo-22-22-22._olpc-activity1._udp.local IN TXT "activity-id=aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa:22222@xo-22-22-22._olpc-activity1._udp.local IN TXT "name=Connect Activity" aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa:22222@xo-22-22-22._olpc-activity1._udp.local IN TXT "color=#005FE4,#00A0FF" aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa:22222@xo-22-22-22._olpc-activity1._udp.local IN TXT "type=org.laptop.ConnectActivity" aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa:22222@xo-22-22-22._olpc-activity1._udp.local IN TXT "tags="

The <message/> sent to the chat room with the updated properties is much the same as for XMPP:

org.laptop.Connect Connect Activity #005FE4,#00A0FF 0 ]]>

When an activity becomes private, the participants all delete it from their activity-properties and activities PEP nodes. In this example, the XO whose JID starts with 11111 makes the activity whose ID starts with aaaaa private, and removes it from their PEP nodes; the XO whose JID starts with 22222 responds by removing it from their PEP nodes too.

To a third XO observing the PEP nodes, this is indistinguishable from both XOs leaving the activity simultaneously, which is what we want.

to='aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa@conference.jabber.laptop.org'> org.laptop.Connect Connect Activity #005FE4,#00A0FF 1 org.laptop.HelloMesh Example Activity #005FE4,#00A0FF 0 ]]>

Instead of deleting activities from their PEP records, link-local peers delete them from their mDNS records.

The <message/> sent to the chat room with the updated properties is, again, much the same as for XMPP.

Before inviting a buddy to an activity, OLPC users are expected to send them the activity properties. These are sent in a <message/> stanza referred to as a "pseudo-invitation". If the activity is private, then this is the only opportunity the invitee has to get the activity properties.

org.laptop.Connect Connect Activity #0d1c38,#49bce4 1 ]]>

If the activity properties change before the invitee joins the activity, the inviter must notify the invitee by re-sending the pseudo-invitation (only).

org.laptop.Connect this name changed #0d1c38,#49bce4 1 ]]>

If the inviter leaves the activity before the invitee joins, the invitee can no longer rely on being notified about any changes; if the activity was private, the invitee can't even rely on being able to see whether it exists. Accordingly, the inviter should cancel their invitation; if all invitations to a private activity have been cancelled, the invitee should assume that the activity has disappeared.

]]>

There isn't the concept of sending an invitation via the MUC service in link-local XMPP, so the process can be made somewhat simpler.

aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
224.0.0.1
23453 org.laptop.Connect Connect Activity #0d1c38,#49bce4 1
]]>
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
224.0.0.1
23453 org.laptop.Connect The name changed #0d1c38,#49bce4 1
]]>
]]>

Properties have the same syntax and semantics as the "parameters" in XEP-proto-tubes.

Putting the current activity in a PEP node, even if it's private, leaks the room name.

None.

None.

]]> ]]> ]]> ]]>