On 12/30/2011 9:58 AM, Kevin Smith wrote:
On Wed, Dec 28, 2011 at 7:20 PM, Artur Hefczyc<[email protected]>  wrote:
On Dec 24, 2011, at 10:32 AM, Kim Alvefur wrote:

On Fri, 2011-12-23 at 20:01 -0800, Artur Hefczyc wrote:
Hi,

I frequently switch IM client running on different devices (mobile, laptop, 
....) and I would
love to have a feature to continue last chat with some recent chat messages 
displayed
on a new device. I have an idea how to implement it in the Tigase server and 
our mobile
client (described below) and I was wondering if there is any XEP which could 
aid in this
task from the protocol side.
XEP-0280: Message Carbons is also meant for this use case.

The idea is following:

1. User chats with a friend on one device
2. Server records and remembers somehow last chats (by thread id for example)
3. User switched devices and opens chat window with a friend in the second 
client
4. The client requests from the server last chat with this friend (we could add 
some
parameters here, like last chat not older than 10 minutes for example)
5. If there is no chat history the server returns an empty list, otherwise the 
server
returns a list of chat messages
6. The client displays messages received from the server and allows the user to
continue conversation.
The difference being that with Carbons you opt in to receiving all
messages as they are sent.
This does not solve the problem really. It causes a few problems:
1. First, when I talk on a desktop client I do not really want my battery 
drained on mobile
with constant messages sent to my mobile client.
2. It does not solve a problem in case when my mobile/desktop client is not 
running during
the chat and then I want to switch device and start a new client.

I think a simple XEP specifying: send me my chat history for the last thread 
would be good enough
and would solve both above cases.
Right, I started idly working on a spec for this, just to tie together
the various bits we already have (or almost have).

I wouldn't recommend using 136 for this, but MattJ's 136 replacement
is a reasonable way to do the bit you describe here - just say "Get me
the last hour's conversation" or whatever. I should clean this up and
submit it once the new archiving XEP's ready.

Carbons also has a place in the overall solution, I think - but mostly
on the desktop side so your desktop has a complete record of what's
going on.

/K

/K
Ultimately, I agree that message archiving will be the best way to accomplish this moving forward, whether it is accomplished via XEP-0136 or some future replacement XEP. Even if we had a magic oracle that could always send your message to the correct available resource, that still does not solve the problem where you have just logged in the device you switched to, since that resource was unavailable when all prior messages were sent.

Any message archiving solutions will target two main scenarios:
1. Get me my recent chat history for all users for when I log in.
2. When I want to start chatting with a specific user, get me the last few chat message for a single user (potentially even if those messages happened long ago).

Message carbons are a useful fallback, though, and they can be a bit optimal since you don't need to make a round trip to fetch the archive from an external source.

Reply via email to