Romeo has a chat or IM UI open already, and wants to use it to chat to Juliet. He selects Juliet from a contact list or types in her username on some IM service.
Current implementation:
if a channel with GetHandle() -> (CONTACT, juliet) exists: foreground its window or tab else: RequestChannel (Text, CONTACT, juliet, suppress_handler=TRUE)
Proposed implementation:
client calls some unspecified method on ChannelDispatcher (FIXME) ChannelDispatcher calls RequestChannels ( SUPRESS_HANDLER | PREFER_REUSE, [ {'...ChannelType': '...Text', '...TargetHandleType': CONTACT, '...TargetHandle': juliet } ]) if the channel that is returned has the EXISTING flag: ChannelDispatcher returns it to the UI UI foregrounds its window or tab else: channel observers run ChannelDispatcher returns it to the UI UI makes a new window or tab for it channel approvers do not run channel handler does not run
Juliet wants to talk to Romeo. She chooses his entry in an address book or other list of people (not necessarily Telepathy-centric) and is presented with a list of possible ways to talk to him. She decides to use text chat.
Current implementation:
address book asks Mission Control for a channel with (Text, CONTACT, romeo) Mission Control calls RequestChannel (Text, CONTACT, romeo, suppress_handler=FALSE) on CM Mission Control dispatches the channel to the default/only handler if the channel is new: the channel handler creates a new window or tab else: the channel handler puts the existing window or tab in the foreground
Problems:
Proposed implementation:
client calls some unspecified method on ChannelDispatcher (FIXME) ChannelDispatcher calls RequestChannels (PREFER_REUSE, [ {'...ChannelType': '...Text', '...TargetHandleType': CONTACT, '...TargetHandle': juliet } ]) if the channel that is returned has the EXISTING flag: ChannelDispatcher returns it to the address book, which does nothing much with it FIXME: how do we tell the UI to foreground it? channel observers/approvers/handler do not run else: channel observers run ChannelDispatcher returns it to the address book, which does nothing much with it FIXME: channel approvers probably do not run? FIXME: how do we choose which channel handler should take it?
Romeo is collaborating on a document with Mercutio, and wants to have a chat embedded in his AbiWord instance, separate from any other chat with Mercutio that may be ongoing.
Current implementation: impossible, even in protocols supporting conversation threads, because the spec can't represent them
Proposed implementation:
bundle_id = ...Bundle property of AbiWord Tube channel client calls some unspecified method on ChannelDispatcher (FIXME) ChannelDispatcher calls RequestChannels (PREFER_REUSE | SUPPRESS_HANDLER, [ {'...ChannelType': '...Text', '...TargetHandleType': CONTACT, '...TargetHandle': mercutio, '...Bundle': bundle_id, } ]) channel observers run if the channel did not already exist channel approvers/handler do not run ChannelDispatcher returns channel to AbiWord if channel has the requested bundle ID: AbiWord uses it else: AbiWord ignores it (on the basis that someone else is already using it)? FIXME: is this always true?
Romeo is talking to Juliet using text chat, but is disconnected due to network instability. After reconnecting, he wants to keep using the same window to talk to Juliet.
A solution for this use case should work correctly (and result in a single channel) if there is a "mid-air collision" with Juliet doing the same thing, with Juliet sending messages to Romeo while he is still offline (on store-and-forward protocols like XMPP), or with Juliet recovering from Romeo's disconnection as per req28 (on protocols that do not allow offline messages).
(Recovering from a connection manager crash is equivalent to this.)
Current implementation: same as req1
Problems:
Proposed implementation (with a new Chan.I.Thread):
Romeo's chat UI (or incoming message database) automatically saves the ...Channel.Interface.Thread.ThreadID property of the old channel Disconnect/reconnect occurs Client calls some unspecified method on ChannelDispatcher (FIXME) ChannelDispatcher calls RequestChannels (SUPRESS_HANDLER, [ {'...Channel.ChannelType': '...Text', '...Channel.TargetHandleType': CONTACT, '...Channel.TargetHandle': juliet, '...Channel.Interface.Thread.ThreadID': thread_id, } ]) from here onwards, same as req1
Romeo chooses a past conversation with Juliet in a log browser and wants to resume it. (The definition of threading in XMPP expects that this is possible.)
Current implementation: same as req2
Problems: Juliet cannot distinguish between this case and req2
Proposed implementation: same as req26, except that it resembles req2 instead of req1 (i.e. no SUPRESS_HANDLER flag)
Juliet is talking to Romeo using text chat when Romeo is disconnected due to network instability. The protocol is one that does not allow offline messages to be sent, like IRC. After reconnecting, Juliet wants to keep using the same window to talk to Romeo.
A solution for this use case should work correctly (and result in a single channel) if there is a "mid-air collision" with Romeo doing the same thing, or with Romeo recovering from disconnection as per req26.
(Recovering from a connection manager crash is equivalent to this.)
Current implementation: Juliet's text channel does not close, but she cannot send messages. When Romeo reconnects, because of 1-1 chat uniqueness, Juliet's client continues to use the same channel and there is no disconnection.
Proposed implementation: Juliet's client continues to use the same channel
Romeo has a VoIP UI open already, and wants to use it to chat to Juliet. He selects Juliet from a contact list or types in her username on some IM service.
Theoretical implementation:
if a channel containing handle juliet exists: foreground its window or tab else: RequestChannel (StreamedMedia, NONE, 0, suppress_handler=TRUE) RequestStreams (juliet, [AUDIO, VIDEO])
Problems:
Resolved problems:
Unless the VoIP UI keeps a table of (handle => channel) (which can't necessarily be done - some protocols allow "parallel" calls), the following race condition:
choose to call Juliet RequestChannel (StreamedMedia, NONE, 0, suppress_handler=TRUE) (request A) choose to call Juliet RequestChannel (StreamedMedia, NONE, 0, suppress_handler=TRUE) (request B) Request A returns /.../ChannelA Request B returns /.../ChannelB
can result in unnecessarily opening two parallel calls to the same contact.
(For instance: Empathy users sometimes incorrectly double-click on the Call button, resulting in two calls.)
Resolution: UIs are responsible for not doing this. For instance, Empathy should disable (make insensitive) the Call button just before requesting a streamed media channel, and re-enable it when the request has either failed or succeeded.
Practical implementation:
if a channel containing handle juliet exists: foreground its window or tab else: RequestChannel (StreamedMedia, NONE, 0, suppress_handler=TRUE) AddMembers ([juliet]) RequestStreams (juliet, [AUDIO, VIDEO])
Problems:
Deprecated implementation:
if a channel containing handle juliet exists: foreground its window or tab else: RequestChannel (StreamedMedia, CONTACT, juliet, suppress_handler=TRUE) RequestStreams (juliet, [AUDIO, VIDEO])
Problems:
Juliet wants to talk to Romeo. She chooses his entry in an address book or other list of people (not necessarily Telepathy-centric) and is presented with a list of possible ways to talk to him. She decides to use a VoIP call.
Current implementation:
RequestChannel (StreamedMedia, NONE, 0, suppress_handler=FALSE) perhaps AddMembers ([romeo]) RequestStreams (romeo, [AUDIO, VIDEO]) The channel handler creates a new window or tab for the new channel
Problems:
Deprecated (?) implementation:
ask Mission Control for a channel (StreamedMedia, CONTACT, romeo) Mission Control does... something?
Problems:
Romeo is collaborating on a document with Mercutio, and wants to have a chat embedded in his AbiWord instance, separate from any other chat with Mercutio that may be ongoing.
Current implementation: same as req5
Problems: same as req5
Romeo is talking to Juliet using VoIP, but is disconnected due to network instability. After reconnecting, he wants to keep using the same window to talk to Juliet.
A solution for this use case should ideally work correctly (and result in a single channel) if there is a "mid-air collision" with Juliet doing the same thing, or with Juliet recovering from Romeo's disconnection as per req30.
(Recovering from a connection manager crash is equivalent to this.)
Current implementation: same as req4
Problems:
Juliet is talking to Romeo using VoIP when Romeo is disconnected due to network instability. After reconnecting, Juliet wants to keep using the same window to talk to Romeo.
A solution for this use case should ideally work correctly (and result in a single channel) if there is a "mid-air collision" with Romeo doing the same thing, or with Romeo recovering from disconnection as per req29.
(Recovering from a connection manager crash is equivalent to this.)
Current implementation: same as req4
Problems:
Tybalt starts an IRC-style chatroom client and wants to join a chatroom, either by explicit request or because his client auto-joins his favourite rooms.
Current implementation:
if a channel with GetHandle() -> (ROOM, chatroom_handle) exists: foreground its window or tab else: RequestChannel (Text, ROOM, chatroom_handle, suppress_handler=TRUE)
Problems:
Proposed implementation: some new interface for this functionality is created, like Chan.I.Chatroom. RequestChannels arguments contain:
{'...Channel.ChannelType': '...Channel.Type.Text', '...Channel.TargetHandleType': ROOM, '...Channel.TargetHandle': chatroom_handle, '...Channel.Interface.Chatroom.Nickname': 'the Prince of Cats', }
Benvolio chooses to rejoin a recently-used chatroom from (hypothetical functionality of) the GNOME Places menu.
Current implementation:
GNOME menu asks Mission Control for a channel with (Text, ROOM, chatroom_handle) Mission Control calls RequestChannel (Text, ROOM, chatroom_handle, suppress_handler=FALSE) on CM Mission Control dispatches the channel to the default/only handler if the channel is new: the channel handler creates a new window or tab else: the channel handler puts the existing window or tab in the foreground
Problems:
Romeo wants to list all the chatrooms on the server or service that hosts his account.
Current implementation:
RequestChannel (RoomList, NONE, 0, suppress_handler=TRUE)
Notes:
Problems:
Proposed implementation: a straightforward port of the current API
Romeo wants to list all the chatrooms on the server that hosts Juliet's account.
Current implementation: impossible
Proposed implementation: in the request, set the Channel.Type.RoomList.Server property to the desired DNS name
Current best-practice to get contact lists (should not use ListChannels and NewChannel, cf my conversation with Zdra in #telepathy on 2008-04-25):
RequestChannel (ContactList, CONTACT_LIST, handle("subscribe")) RequestChannel (ContactList, CONTACT_LIST, handle("publish")) RequestChannel (ContactList, CONTACT_LIST, handle("hide")) RequestChannel (ContactList, CONTACT_LIST, handle("allow")) RequestChannel (ContactList, CONTACT_LIST, handle("deny"))
Current best-practice to get initial user-defined groups:
ListChannels ()
(finding new groups will be part of the "incoming" use cases list)
Problems:
Current implementation:
RequestChannel (ContactList, GROUP, handle("Colleagues"), suppress_handler=FALSE)
This section refers to protocols like MSN, where what appears to be a 1-1 conversation is actually just an unnamed chatroom into which other users can be invited.
(The same as req1, but Romeo and Juliet are using a "fully correct" MSN implementation like telepathy-butterfly, or some similar protocol.)
Romeo has a chat or IM UI open already, and wants to use it to chat to Juliet. He selects Juliet from a contact list or types in her username on some IM service.
Hypothetical implementation:
if a channel with GetHandle() -> (NONE, 0) exists, and its set of members contains Juliet's handle, and no other handles other than Romeo's: foreground its window or tab else: either: RequestChannel (Text, CONTACT, juliet, suppress_handler=TRUE) or: RequestChannel (Text, NONE, 0, suppress_handler=TRUE) AddMembers([juliet])
(Capability discovery can be used to decide whether to use the first or second way to request a channel - the second must be used if we intend to invite others to the channel later)
Problems:
Proposed implementation:
Romeo is talking to Juliet using text chat, but is disconnected due to network instability. After reconnecting, he wants to keep using the same window to talk to Juliet.
A solution for this use case should work correctly (and result in a single channel) if there is a "mid-air collision" with Juliet doing the same thing, with Juliet sending messages to Romeo while he is still offline (on store-and-forward protocols like XMPP), or with Juliet recovering from Romeo's disconnection as per req33 (on protocols that do not allow offline messages).
(Recovering from a connection manager crash is equivalent to this.)
Current implementation: same as req13
Problems:
Proposed implementation:
Romeo chooses a past conversation with Juliet in a log browser and wants to resume it. (The definition of threading in XMPP expects that this is possible.)
This is basically req31 but for a different reason; I expect that the solution can be similar.
Current implementation: same as req13
Problems: Juliet cannot distinguish between this case and req13
Proposed implementation:
Juliet is talking to Romeo using text chat when Romeo is disconnected due to network instability. The protocol is one that does not allow offline messages to be sent, like IRC. After reconnecting, Juliet wants to keep using the same window to talk to Romeo.
A solution for this use case should work correctly (and result in a single channel) if there is a "mid-air collision" with Romeo doing the same thing, or with Romeo recovering from disconnection as per req31.
(Recovering from a connection manager crash is equivalent to this.)
Current implementation: unclear
Problems:
Proposed implementation:
Romeo wants to talk to both Mercutio and Benvolio in an ad-hoc chatroom. He selects them both from a contact list, or types in both their usernames.
Hypothetical implementation:
if a channel with GetHandle() -> (NONE, 0) exists, and its set of members contains exactly (Mercutio, Benvolio, Romeo): foreground its window or tab else: RequestChannel (Text, NONE, 0, suppress_handler=TRUE) AddMembers([mercutio, benvolio])
Problems:
Romeo wants to talk to both Mercutio and Benvolio in an ad-hoc chatroom. He selects Mercutio from a contact list, or types in Mercutio's username, then invites Benvolio to the chatroom too.
Hypothetical implementation:
if a channel with GetHandle() -> (NONE, 0) exists, and its set of members contains exactly (Mercutio, Romeo): foreground its window or tab else if Capabilities interface indicates support for inviting contacts to ad-hoc chatrooms: RequestChannel (Text, NONE, 0, suppress_handler=TRUE) AddMembers([mercutio]) # when Benvolio is invited... AddMembers([benvolio]) else: RequestChannel (Text, CONTACT, [mercutio], suppress_handler=TRUE) Do not offer UI for adding Benvolio
Problems:
Proposed implementation:
(The same as req2, but Romeo and Juliet are using a "fully correct" MSN implementation like telepathy-butterfly, or some similar protocol.)
Juliet wants to talk to Romeo. She chooses his entry in an address book or other list of people (not necessarily Telepathy-centric) and is presented with a list of possible ways to talk to him. She decides to use text chat.
Current implementation: unclear
Possible implementation:
address book asks Mission Control for a channel with (Text, CONTACT, romeo) Mission Control calls RequestChannel (Text, CONTACT, romeo, suppress_handler=FALSE) on CM CM does... something? Mission Control dispatches the channel to the default/only handler if the channel is new: the channel handler creates a new window or tab else: the channel handler puts the existing window or tab in the foreground
Problems:
Proposed implementation:
The same as req14 but from an address book.
Hypothetical implementation:
Problems:
Proposed implementation:
Romeo is collaborating on a document with Mercutio, and wants to have a chat embedded in his AbiWord instance, separate from any other chat with Mercutio that may be ongoing.
Current implementation: unclear
Possible implementation:
RequestChannel (Text, NONE, 0, suppress_handler=TRUE) AddMembers ([mercutio])
Problems:
Proposed implementation: same as req3
Same as http://www.xmpp.org/extensions/xep-0045.html ยง7.6. XMPP does this by using thread IDs.
Current implementation: can't be done
Hypothetical implementation: request a chatroom channel with the same thread ID and bundle ID as the 1-1 chat
Romeo is talking to Juliet using a text or VoIP UI, and wishes to send Juliet a file in the context of that conversation.
Romeo right-clicks on a file in his file manager, chooses a "Send to User" option and chooses to send it to Juliet.
Proposed implementation:
client calls some unspecified method on ChannelDispatcher (FIXME) ChannelDispatcher calls RequestChannels ( 0, [ {'...Channel.ChannelType': '...Channel.Type.FileTransfer', '...Channel.TargetHandleType': CONTACT, '...Channel.TargetHandle': juliet, # exact attributes of file offers undecided, but might include: '...Channel.Type.FileTransfer.ContentType': 'image/png', ... } ]) channel observers run ChannelDispatcher returns it to the address book, which does nothing much with it FIXME: channel approvers probably do not run? FIXME: how do we choose which channel handler should take it?
While collaborating on a document with Mercutio, Romeo inserts an embedded image into the document. The collaborative application could usefully choose to represent this by a file transfer.
Proposed implementation:
bundle_id = ...Bundle property of AbiWord Tube channel client calls some unspecified method on ChannelDispatcher (FIXME) ChannelDispatcher calls RequestChannels (PREFER_REUSE | SUPPRESS_HANDLER, [ {'...ChannelType': '...FileTransfer', '...TargetHandleType': CONTACT, '...TargetHandle': mercutio, '...Bundle': bundle_id, ... } ]) channel observers run if the channel did not already exist channel approvers/handler do not run ChannelDispatcher returns channel to AbiWord if channel has the requested bundle ID: AbiWord uses it else: ??? FIXME
An OLPC Activity instance encapsulates an instance of an application, zero or more D-Bus tubes and zero or more stream tubes to transfer messages or state between participants, and a text chatroom to discuss the activity.
In the "1.0" protocol used in early 2008, each Activity instance is backed by an XMPP or Clique MUC (chatroom).
Current implementation: we assume that the channels (Tubes, ROOM, foo) and (Text, ROOM, foo) correspond 1:1. Activity discovery is done out-of-band using OLPC-specific extensions, although we'd like to make some of it more standard (mainly invitations).
Problems:
Proposed implementation:
Tybalt asks Juliet to help him fix a problem with his computer. He offers her a VNC connection to his computer so she can interact with his desktop.
Proposed implementation:
Romeo offers Mercutio and Benvolio access to an OpenArena server running on his local computer.
Proposed implementation:
Romeo opens a text channel to Juliet to send a message, but Juliet's server is down and Romeo's server signals failure. (This is mostly applicable to decentralized protocols like XMPP and SIP.)
Current implementation:
the message is sent SendError (and soon DeliveryReporting) report the failure the channel remains open
Proposed implementation: keep the current implementation
Romeo makes a VoIP call to Juliet, but Juliet's server crashes and failure is signalled.
Current implementation:
Juliet is removed from the Group interface, with an error for the reason the StreamedMedia channel closes
Proposed implementation: keep the current implementation?
Juliet starts a VoIP call to Tybalt, but then thinks better of it and cancels the call before the channel has actually been opened.
Current implementation (NMC 4.x):
UI calls mission_control_cancel_channel_request() if dispatching of the channel has already begun: cancellation succeeds else: cancellation fails the UI is asked to handle the channel
Problems:
Romeo makes a VoIP call to Juliet from a Maemo device at a time when he has no connectivity. Mission Control (the ChannelDispatcher implementation) on Maemo is able to request that the device obtains some sort of connection when needed, so it does so. However, Romeo is not near a wireless LAN access point, and it takes a couple of minutes for him to walk towards one.
Naive implementation: the request is a method call, the request being satisfied is a response
Problems: the D-Bus method call will time out after around 25 seconds unless special action is taken
Proposed implementation: the ChannelDispatcher creates a request "cursor" object for the duration of the request