Activity Sharing: Difference between revisions
DanWilliams (talk | contribs) |
No edit summary |
||
Line 1: | Line 1: | ||
== Summary == |
== Summary == |
||
Little of this is set in stone, but we're fairly certain that we'll be using [http:// |
Little of this is set in stone, but we're fairly certain that we'll be using [http://xmpp.org XMPP] (both with a server and link-local) and that we'll be using [http://telepathy.freedesktop.org Telepathy]. Much of the protocol uses existing Jabber communications primitives, extending them where necessary. Telepathy abstracts the details of the underlying protocol from the activities. |
||
Rationale: Telepathy |
Rationale: Telepathy |
||
* has existing implementations of both server and |
* has existing implementations of both server and link-local XMPP |
||
* is based on D-Bus |
* is based on D-Bus |
||
* can be used from Python |
* can be used from Python |
||
Line 15: | Line 15: | ||
In order: |
In order: |
||
* Activities working with a server, ~30 participants |
* Activities working with a server, ~30 participants in the activity, ~100 contacts on the server. |
||
* Activities working without a server, ~10 participants |
* Activities working without a server, ~10 participants in the activity, ? contacts visible on the mesh. |
||
* Mixed mesh/server (uncertain if this occurs in practice, see [[Activity_Sharing#Open_issues]]) |
* Mixed mesh/server (uncertain if this occurs in practice, see [[Activity_Sharing#Open_issues]]) |
||
* Mesh with more than one channel (see [[Activity_Sharing#Open_issues]]) |
* Mesh with more than one RF channel (see [[Activity_Sharing#Open_issues]]) |
||
We want to cover all these cases, but it's more important that we cover the ones towards the top sooner. |
We want to cover all these cases, but it's more important that we cover the ones towards the top sooner. |
||
Line 24: | Line 24: | ||
== Components == |
== Components == |
||
* Sugar library & Telepathy python bindings |
|||
* Presence service |
* Presence service |
||
* Gabble (Telepathy XMPP server backend) |
|||
* Gabble |
|||
* Salut (Telepathy XMPP link-local backend) |
|||
* Salut |
|||
* XMPP server (probably ejabberd or wildfire?) |
|||
* Jabber server |
|||
== Presence service == |
== Presence service == |
||
Line 38: | Line 39: | ||
** incoming events |
** incoming events |
||
** enumerate buddies' stuff |
** enumerate buddies' stuff |
||
* deciding which information is relevant and retrieving it for sugar |
|||
* filtering out non-relevant information |
|||
=== Invitations === |
=== Invitations === |
||
* incoming channels should be turned into activities by the presence service |
* incoming channels should be turned into activities by the presence service |
||
** one-to-one channels like an IM or a voice/video call can be made into a private activity |
|||
* it uses its map of buddies <-> shared activities to work out the corresponding MUC |
|||
** multi-user channels should be looked up in the map of buddies <-> activties to work out what shared activity they correspond to |
|||
* it emits a signal which Sugar can use to ask the child whether they would like to join the activity |
* it emits a signal which Sugar can use to ask the child whether they would like to join the activity |
||
== Python objects == |
== Python objects == |
||
Buddy: |
|||
* name |
|||
* colour |
|||
* avatar |
|||
* public key |
|||
* activities and which one is current |
|||
Activity: |
Activity: |
||
Line 53: | Line 63: | ||
* type |
* type |
||
* colour |
* colour |
||
* tubes |
* tubes that make up this channel |
||
* chat (Telepathy text channel) |
* chat (Telepathy text channel) |
||
Line 62: | Line 72: | ||
== Tubes == |
== Tubes == |
||
A ''tube'' is a new Telepathy primitive for sending and receiving data, which can be to one person or to a group of people. Tubes can carry |
A ''tube'' is a new Telepathy primitive for sending and receiving data, which can be to one person or to a group of people. Tubes can carry reliable byte streams or unreliable datagrams by analogy to TCP or UDP, although some different semantics such as reliable datagrams might be more appropriate for a multi-user case. It is up to the connection manager how tubes are implemented on top of its |
||
A tube might be connected to one person, or to a group of people. When a D-Bus tube is connected to a group of people, a mapping is made between the idenities of the people on the underlying protocol and D-Bus names. |
|||
It is up to the connection manager how tubes are implemented on top of its |
|||
protocol. |
protocol. |
||
A more advanced idea is to represent the multi-user tube as a D-Bus bus, and have the connection manager make a mapping between the participants in the tube and D-Bus bus name. Clients can then take advantage of D-Bus's serialisation and the bindings so that they have to do less protocol work. |
|||
== Joining an activity == |
== Joining an activity == |
||
In order to join an activity, the presence service should be able to tell us: |
|||
* the type of activity |
* the name, type and colour of the activity |
||
* the Telepathy channels that comprise the activity |
|||
* who the participants are |
|||
When we join, the library will find out from the Telepathy backend: |
|||
The presence service has given us this information. We need to discover |
|||
* the |
* the tubes active within the activity |
||
* the full list of participants |
|||
* what tubes the activity has |
|||
Any activity-specific discovery is implemented in an activity-specific manner. |
|||
== Implementing activities in Gabble == |
== Implementing activities in Gabble == |
||
* PEP (Personal Eventing Protocol) will be used for buddies to publish their information such as name, colour, key, avatar and current activities. |
|||
⚫ | |||
⚫ | |||
** Initally, these attributes will be stored by the participants |
|||
⚫ | |||
* Point-to-point tubes are implemented using [http://www.xmpp.org/extensions/xep-0095.html Jabber stream initiation] (SI) |
* Point-to-point tubes are implemented using [http://www.xmpp.org/extensions/xep-0095.html Jabber stream initiation] (SI) |
||
** No NAT traversal is necessary |
** No NAT traversal is necessary currently |
||
⚫ | |||
** Multi-user tubes are implemented by sending messages over the MUC |
|||
** Initially, each participant broadcasts tube information in his MUC presence |
|||
⚫ | |||
⚫ | |||
** Initially, we could publish it in the per-buddy PEP nodes. |
|||
** We should move it to some per-MUC storage. |
|||
== Implementing activities in Salut == |
== Implementing activities in Salut == |
||
Line 101: | Line 111: | ||
MUCs. |
MUCs. |
||
MEP stands for MUC Eventing via PubSub, by analogy to '' |
MEP stands for MUC Eventing via PubSub, by analogy to ''PEP'' (Personal |
||
Eventing via PubSub). MEP simplifies PubSub for MUCs, much as PEP simplifies |
Eventing via PubSub). MEP simplifies PubSub for MUCs, much as PEP simplifies |
||
PubSub for personal information. |
PubSub for personal information. |
||
Line 107: | Line 117: | ||
A MEP-compliant MUC server will: |
A MEP-compliant MUC server will: |
||
* |
* provision one PubSub item per MUC |
||
* map affiliations of the MUC members to t |
|||
* enforce permissions on that node according to the affiliations of the channel members |
* enforce permissions on that node according to the affiliations of the channel members |
||
Line 119: | Line 128: | ||
== Trust model == |
== Trust model == |
||
We assume that we can trust the server, and that TCP sessions are hard to |
We assume that we can trust the server, and that encrypted TCP sessions are hard to |
||
hijack, meaning that we don't need to sign every message when we are connected to the server. |
hijack, meaning that we don't need to sign every message when we are connected to the server, and can trust that JIDs belong to their owner. |
||
We eagerly cache keys we see in order to provide continuity checking (the Bob I talked to today is the same Bob I talked to yesterday). |
We eagerly cache keys we see in order to provide continuity checking between server and mesh contacts, and mesh contacts at different times (the Bob I talked to today is the same Bob I talked to yesterday). |
||
== Privacy == |
== Privacy == |
||
Line 133: | Line 142: | ||
== Open issues == |
== Open issues == |
||
* how do we implement migration of activites from the mesh to the server? |
* how do we implement migration of activites from the mesh to the server, and do we need to? |
||
* how do we register accounts with the Jabber server when laptops are activated? |
* how do we register accounts with the Jabber server when laptops are activated? |
||
** how JIDs are assigned |
** how JIDs are assigned |
||
Line 144: | Line 153: | ||
** is it ok because we have presence from link-local contacts we are not subscribed to anyway? |
** is it ok because we have presence from link-local contacts we are not subscribed to anyway? |
||
* what does the Sugar API look like? |
* what does the Sugar API look like? |
||
* Finding your friends when you have more than one mesh channel and more than one server: |
|||
** If you're sitting next to someone and want to make them your friend, but you're both on different mesh RF channels, you won't see them on the link-local. Can we do something better than searching a directory? |
|||
** Maybe we can put something on the screen (a [http://www.cl.cam.ac.uk/research/dtg/research/wiki/Tinytag visual tag] of some sort) which encodes their identity (a JID or key or whatever) which can be photographed with the camera and then we can deal with finding the person on the server or mesh. |
|||
* What do we do when key continuity is violated? |
|||
== Implementation plan == |
== Implementation plan == |
Revision as of 13:35, 18 February 2007
Summary
Little of this is set in stone, but we're fairly certain that we'll be using XMPP (both with a server and link-local) and that we'll be using Telepathy. Much of the protocol uses existing Jabber communications primitives, extending them where necessary. Telepathy abstracts the details of the underlying protocol from the activities.
Rationale: Telepathy
- has existing implementations of both server and link-local XMPP
- is based on D-Bus
- can be used from Python
- has support for voice/video calling using GStreamer
- is known to work in resource-limited environments
Priorities
In order:
- Activities working with a server, ~30 participants in the activity, ~100 contacts on the server.
- Activities working without a server, ~10 participants in the activity, ? contacts visible on the mesh.
- Mixed mesh/server (uncertain if this occurs in practice, see Activity_Sharing#Open_issues)
- Mesh with more than one RF channel (see Activity_Sharing#Open_issues)
We want to cover all these cases, but it's more important that we cover the ones towards the top sooner.
Components
- Sugar library & Telepathy python bindings
- Presence service
- Gabble (Telepathy XMPP server backend)
- Salut (Telepathy XMPP link-local backend)
- XMPP server (probably ejabberd or wildfire?)
Presence service
- starting/maintaining connections to the server
- registering with the server
- discovering users + subscribing to their presence
- caching buddy info
- finding activities
- incoming events
- enumerate buddies' stuff
- deciding which information is relevant and retrieving it for sugar
Invitations
- incoming channels should be turned into activities by the presence service
- one-to-one channels like an IM or a voice/video call can be made into a private activity
- multi-user channels should be looked up in the map of buddies <-> activties to work out what shared activity they correspond to
- it emits a signal which Sugar can use to ask the child whether they would like to join the activity
Python objects
Buddy:
- name
- colour
- avatar
- public key
- activities and which one is current
Activity:
- name
- type
- colour
- tubes that make up this channel
- chat (Telepathy text channel)
Tube:
- type (DBus, dgram, stream)
Tubes
A tube is a new Telepathy primitive for sending and receiving data, which can be to one person or to a group of people. Tubes can carry reliable byte streams or unreliable datagrams by analogy to TCP or UDP, although some different semantics such as reliable datagrams might be more appropriate for a multi-user case. It is up to the connection manager how tubes are implemented on top of its protocol.
A more advanced idea is to represent the multi-user tube as a D-Bus bus, and have the connection manager make a mapping between the participants in the tube and D-Bus bus name. Clients can then take advantage of D-Bus's serialisation and the bindings so that they have to do less protocol work.
Joining an activity
In order to join an activity, the presence service should be able to tell us:
- the name, type and colour of the activity
- the Telepathy channels that comprise the activity
When we join, the library will find out from the Telepathy backend:
- the tubes active within the activity
- the full list of participants
Implementing activities in Gabble
- PEP (Personal Eventing Protocol) will be used for buddies to publish their information such as name, colour, key, avatar and current activities.
- Point-to-point tubes are implemented using Jabber stream initiation (SI)
- No NAT traversal is necessary currently
- Each activity has a MUC (Multi-User Chat) on the Jabber server
- Multi-user tubes are implemented by sending messages over the MUC
- Initially, each participant broadcasts tube information in his MUC presence
- Later, we will use MEP to store the tube information
- Each activity has a set of attributes, including the type of activity and the colour, which we need to get from somewhere.
- Initially, we could publish it in the per-buddy PEP nodes.
- We should move it to some per-MUC storage.
Implementing activities in Salut
We haven't thought about this in detail. It might use Sjoerd's Link-local MUC.
MEP
MEP is something we have made up in order to store activity metadata on MUCs.
MEP stands for MUC Eventing via PubSub, by analogy to PEP (Personal Eventing via PubSub). MEP simplifies PubSub for MUCs, much as PEP simplifies PubSub for personal information.
A MEP-compliant MUC server will:
- provision one PubSub item per MUC
- enforce permissions on that node according to the affiliations of the channel members
Voice/Video
Use of voice/video is limited by the fact that Gabble only supports point-to-point voice/video calls. Salut currently does not support voice/video calling.
Trust model
We assume that we can trust the server, and that encrypted TCP sessions are hard to hijack, meaning that we don't need to sign every message when we are connected to the server, and can trust that JIDs belong to their owner.
We eagerly cache keys we see in order to provide continuity checking between server and mesh contacts, and mesh contacts at different times (the Bob I talked to today is the same Bob I talked to yesterday).
Privacy
Can we do friends-only activities? Two parts to this:
- hiding the presence of the activity
- guarding the MUC with e.g. a password
Open issues
- how do we implement migration of activites from the mesh to the server, and do we need to?
- how do we register accounts with the Jabber server when laptops are activated?
- how JIDs are assigned
- what happens if a laptop is moved between activation servers
- are participants in an activity equal, or is there one person who is hosting each activity?
- this may be different depending on the needs of specific activities; games may want to have a 'master' who hosts, but chat-type communication is less structured
- is formatted text (XHTML Basic) a requirement, or is plain text sufficient?
- is the Jabber presence model appropriate for our needs, given that it requires that we subscribe to everyone in order to be able to see them?
- will we be able to discover activities if we are not subscribed to the participants' presence?
- is it ok because we have presence from link-local contacts we are not subscribed to anyway?
- what does the Sugar API look like?
- Finding your friends when you have more than one mesh channel and more than one server:
- If you're sitting next to someone and want to make them your friend, but you're both on different mesh RF channels, you won't see them on the link-local. Can we do something better than searching a directory?
- Maybe we can put something on the screen (a visual tag of some sort) which encodes their identity (a JID or key or whatever) which can be photographed with the camera and then we can deal with finding the person on the server or mesh.
- What do we do when key continuity is violated?
Implementation plan
Getting from here to there.
Phase 1
Basic multi-user chat, some regressions from existing presence service.
Sugar (or telepathy-python)
- API for chats
Presence Service
- Connecting
- Registering
- Discovering users + subscribing
- colours
- key
- nick
- Discovering activities
Telepathy Spec
- PEP Buddy Info (OLPC-specific?)
Gabble
- PEP Buddy Info
- PEP Avatars
Server
- List people
Phase 2
Telepathy Spec
- Tube interface
= Gabble
- Extend MUC presence with tubes
- MUC tubes
Sugar (or telepathy-python)
- API for tubes
Phase N
- Add tubes to Telepathy D-Bus API
- Gabble
- implement point-to-point tubes
- implement IM->MUC migration
- choose between Ejabberd and Wildfire for the server
- video conferencing activity