On Fri, Mar 28, 2008 at 9:45 PM, Alexander Gnauck <[EMAIL PROTECTED]> wrote:
> I agree with Justin. And IMHO BOSH makes no sense on a mobile phone when > you have the ability to use TCP. It will also consume much more traffic > than a TCP connection. > BOSH is great for web clients where TCP is not possible. Or for networks > where you have access to the Internet only over HTTP proxies and HTTP > CONNECT is disabled in the proxy. I'd agree if it were possible to have easy stanza acknowledgments and fast stream reconnect with TCP sockets, which are implicit in BOSH. Even if XEP-198 were stable and available biw, BOSH would have the advantage of framing packets with HTTP headers telling the content length[1]. In this way the state of the parser is minimal and we know exactly if something is going wrong. I never had the time to do tests about bandwidth, but my impression is that the best solution for mobile would be this: - frame each stanza with BOSH like headers encoded in a ASN.1 style (token length, token type, value) - encode XML again in a ASN.1 style - compress, which would take away most of the added redundancy This simplifies the parser, taking fewer cpu cycles, which can be spent in compression, and it allows handling interruption in a trivial way. Finally: I'd avoid doing premature optimizations that make the protocol clumsy, before taking any decision I'd like to have somebody presenting the figures for which compression is too heavy, or BOSH too verbose, or I don't know... My considerations above are just about the simplicity of the parser and the ability of recovering from errors, but before asserting they are good I'd like to do some traffic simulation. [1] Another good side effect for mobiles: if a receive a packet whose size is 10KB there are good chances it will kill the parser and the client by filling its memory; a regular XML parser can't realize until it's too late, a framed parser can skip the packet and send back an error. bye -- Fabio Forno, Ph.D. Bluendo srl http://www.bluendo.com jabber id: [EMAIL PROTECTED]
