[Standards-JIG] PROPOSAL for Live Chat

Pedro Melo melo at co.sapo.pt
Fri Jan 5 14:07:53 UTC 2007


Hi,

On Jan 5, 2007, at 3:44 AM, Peter Saint-Andre wrote:

> JD Conley wrote:
>> If that biz rule can't be changed then I vote the draft should be
>> something that depends on 0085 so we can re-use the active and
>> composing states.
>> However, it does seem logical that the "live" text is simply just an
>> overloaded composing state.
>
> Character-by-character updates are something that you send while in  
> the composing state, but your chat state doesn't change while you  
> are sending each character -- all the while you are still just  
> composing as far as chat state notifications are concerned. So  
> there is no reason to send another composing event (the "yep I'm  
> still composing" event?).
>
> IMHO a separate protocol is in order. Negotiate it separately from  
> chat states because it really is different and will have its own  
> parameters (do we agree to use it? do we send one char at a time or  
> bunch them up? etc.). Don't overload chat state notifications with  
> a function it wasn't intended to perform, and let those specialized  
> systems that want "live" chat have it in a granular manner.
>
> Something like this seems good (no body!):
>
> <message from='romeo' to='juliet'>
>   <add xmlns='urn:xmpp:live'>H</add>
> </message>
>
> <message from='romeo' to='juliet'>
>   <add xmlns='urn:xmpp:live'>e</add>
> </message>
>
> <message from='romeo' to='juliet'>
>   <add xmlns='urn:xmpp:live'>l</add>
> </message>
>
> <message from='romeo' to='juliet'>
>   <add xmlns='urn:xmpp:live'>l</add>
> </message>
>
> <message from='romeo' to='juliet'>
>   <add xmlns='urn:xmpp:live'>o</add>
> </message>
>
> <message from='romeo' to='juliet'>
>   <add xmlns='urn:xmpp:live'>!</add>
> </message>
>
> <message from='romeo' to='juliet'>
>   <body>Hello!</body>
> </message>

I would recommend instead something like this:

First some ground rules:
  - updates are sent at least one each 500ms;
  - if the users pauses for more than 250ms
  - each stanza sends a partial set of characters, including a offset  
number, and a total size number. The receives replaces the current  
text starting at offset with the received update and then trims at  
the lenght. This should cover any updates/deletes, etc)
  - on completion of the message (sender presses send, or hits enter,  
or whatever method he uses), the complete message is sent, with a  
"complete" marker.

I think this would reduce a bit the load on the network without  
loosing much interactivity.

FYI, iChat supports live chat on Bonjour/Link-local conversations and  
they send each N milliseconds also.

Best regards,
--
HIId: Pedro Melo
SMTP: melo at co.sapo.pt
XMPP: pedro.melo at sapo.pt




More information about the Standards mailing list