powered by Jive Software

Does Openfire support BOSH?


Is Openfire implementation of HTTP binding done as BOSH as described in XEP-0124?

Does anybody know about any good xmpp java library that supports HTTP?



Well, in fact, if somebody is interested Openfire does support BOSH. After looking into the code I see that Alexander Wenckus implemented it as described in XEP-0124: Bidirectional-streams Over Synchronous HTTP (BOSH)



To be a little more specific, we currently implement an older version of the protocol, before it was called BOSH. Though we do plan to add support in the near future for BOSH.



What is the status of this implementation? Is BOSH there yet, or only the old version of the protocol?

What is the standard port to connect to, and do the server need to be configured for BOSH?

Openfire currently utilizes the old version of the protocol. I don’'t know when the work will be scheduled to do the upgrade to the latest version of the protocol, but, I am eager to do the work. Nothing currently needs to be configured, it will be running out of the box on port 8080.


Boy aint this all confusing.

My goal is to create a cross-domain javascript interface to XMPP sorta like a google map works.

So I’'ve been fiddling with it in my “spare time” between paying work trying to work up something

that works in a reasonable fashion. Thus far using a PHP script for mocking it up, I can using http-bind

send messages without error. I must but assume that all the nice 200 OK response codes are a positive sign.

Once I do figure out something sorta useful from the context of the PHP mockup , I’'ll write it up in something more intense like one of my forking servers in C++

It would be nice to find a few folks to share notes and efforts with in this endevour.

I’'ve been coding for the internet since ~1994 and programming in general since before screens and keyboards

but this XMPP thing has been a real challenge.

I see XMPP as more of a context server than a simple chat protocol, sharing beyond chat , games , whiteboards,

buddy browsing, document sharing , business processes and many other applications,

The problem is that I’'m a generalist and need the help of some folks who have made XMPP a focus.

In the end this will be an opensource gig so that we all can have a really simple interface born of basic DOM manipulation with the nuts and bolts of XMPP kindly buried in a little black box where it belongs, with of course

hooks for those wanting to manipulate the interaction at various lower levels.

Anyone game for this? or am I to continue fighting it out alone in the cold?

I just get the feeling at times that folks are more interested in the geekdom aspect of this than making

XMPP a practical tool. The reason I chose wildfire/openfire is simply because it can use MySql , which allows

me to better integrate it with other sub systems.

Any thoughts?

One can either respond here (so that all can see) or if one wants to be more pro active , hit me up at drclue@gmail.com


I have found that Http Binding works very well with Openfire, but as my code will run in a very restricted mode I need to do Http Polling as well, which is supported but not recommended by the spec. Using a screwdriver, a sledgehamer and plastic tape, I can get this to work, but it’'s not working very great.

My main problems, first, and then my questions:

  • I can not poll with very long intervals, as the inactivity flag is set to 60 secs. I need to be able to poll once every five minutes, in order not to waste bandwidth.

  • During intialization, the minimum poll time of 5 secs is getting in my way. When I send a stanza to the Openfire server (connection manager), I get an empty response. So I will have to back down a few millisecs and the poll for an answer. Thus far, it works. But then when I send the next Stanza and get another empty response, I will need to poll for a decent answer again. And the minimum polling time is set to 5 by Openfire, which means that I have to wait 5 secs between every stanza I send to Openfire, which causes a very lengthy connection phase.

My questions are: How hard do you gurus think it is to hack the following things into the server (i.e. what will I have to do: just change a variable or rewrite some thread handling), and if how do you think they will increase the load on the server:

  • increase client inactivity to five minutes

  • decrease minimum client polling time to 0.5s

I’'d really like to know before I plunge deep into unknown server land.

increase client inactivity to five minutes - set system property xmpp.httpbind.client.idle to 300

decrease minimum client polling time to 0.5s - set system property xmpp.httpbind.client.requests.polling to .5 or turn it off by setting it to 0.




Openfire proves itself better than I had expected.


While implementing a BOSH client working with Openfire I found HTTPSession behavior a bit problematic. I think that server shouldn’'t throw session away when a packet with bad RID arrives. These packets should be silently discarded instead. For example, working on mobile phone where connection is not reliable and threading model is a little different from a PC packet might be delivered far from its order. Now every glitch like this throws the session away.

Kind Regards,