Discussion:
Call for participation: HTTP Binding (BOSH) client
Jon Tara
2011-09-15 03:30:31 UTC
Permalink
I've been working on some fixes for the HTTP Binding (BOSH) client. This
is a call for participation. I am interested in what others have done or
discovered, as well as ideas for future direction.

AFAIK, BOSH has been completely broken since at least 0.5 (or perhaps
forever).

Hew Giddens did some fixes about a year ago. You can find them in the
improve-http-binding-client branch of his github repository at:

http://github.com/hgiddens/xmpp4r

For the most part, these are an improvement. For one, he corrected an
"off by one" error that caused the client to eventually continuously
throw posts at the server at http_polling interval until both client and
server got throughly confused and the server got fed up with it
(typically a couple of minutes).

I've forked the current head, incorporated Hew's BOSH fixes, and added
some of my own. You can review the result at my github repository at:

http://github.com/watusi/xmpp4r

I've made a branch with just Hew's fixes, in hgiddens_bosh_fixes, and
one with his plus my own in watusi_bosh_fixes.

I've gotten SSL to work (yay! it only worked with non-SSL connections
before) and made changes to set sensible timeouts for post() requests.

Next up will be to stop it from doing infinite retries (almost certainly
a bad idea ;) ) and to have it stop retrying on known terminal
conditions. (For example, getting a terminate from the server, or an
HTTP not found error - which means the server has deleted the session.)

This needs a lot of work yet, but at least it's limping.

Please feel free to post your thoughts here, or to author enter issues
on github.

My ultimate goal here is to use XMPP4R in a mobile application using the
Rhodes framework:

http://rhomobile.com/

My plan is to merge this BOSH fix branch into the master of my
repository, then create a branch for changes needed for the Rhodes
environment. (Mainly, logging using their logger and their wrappers over
native SSL libraries). I'll continue to maintain the master without the
Rhodes pollution.

BOSH would seem the most appropriate of the current client choices for
this, given the tenuous nature of mobile connections, firewall issues,
etc. Websockets does interest me as well, and there is a websockets
implementation for the server I am using, ejabberd:

http://github.com/superfeedr/ejabberd-websockets

So, I'd like to hear from anyone working on or considering a websockets
client implementation for XMPP4R.

Loading...