I’m from the Jetty development team, and we’re interested in helping upgrade the continuations in Openfire from jetty-6-style continuations to jetty-7-style continuations. One advantage of upgrading is that while jetty-6-style continuations were a Jetty-specific mechanism, the jetty-7-style continuations are portable and work with a variety of containers. This means that they’ll work asynchronously with Jetty 6/7/8 and any servlet-3.0 containers. They’re also still compatible with servlet-2.5 containers, where they’ll be blocking.
We’ve had a few API changes, so switching versions requires a bit more than just dropping in updated JAR, but it’s not an extreme change, either. I have three patches:
openfire.jetty6.patch
converts the continuations, with the addition of a filter to make the new-style continuations work with Jetty 6
keep the existing jetty-6 JARs
requires one new JAR file jetty-continuations.jar (direct download link)
openfire.upgrade.jetty7.patch
upgrades jetty-6 to jetty-7
requires a few new JAR files, all noted in the diff for the versions.txt, and downloadable as JARs
openfire.continuations.jetty7.patch
converts the continuations
The *.jetty7.patch patches need to be combined for the project to compile; I’ve separated them out this way to make it easier to determine what was changed, and why.
I have updated Openfire to the latest RC version of Jetty 7 using the patches provided above. It was a little bit painful but came together in the end.
The reason I am trying the update is to resolve the issue in threads:
Hopefully this will fix this issue as this update seems to make major updates to the continuations. So far soo good.
If anyone else needs help making this update let me know.
The good news is that this version has stopped the Continuation errors and so the CPU isn’t jumping up anymore.
When I copied all the java libraries into the Openfire merge I got a bunch of strange security errors and it wouldn’t compile.
Then I had ongoing issues trying to compile. Eventually by identifying exactly which java libraries were required it worked, but it took a lot of going backwards and forwards to work this out. Sorry I don’t have the details at hand at the moment.
I also had some issues with functions that were missing in derived classes. This was easily fixed though but they should be put into your patch. Again I can’t remember which class it was at the moment and I don’t have access to the system.
If helpful, I will try and get the details across to you when I get back in the office.
I’ve actually been doing quite a bit of work to refactor the Openfire BOSH implementation since every time we try to use it in production it brings our server down rather quickly. The Jetty7 continuation patch by itself didn’t seem to help much.
This weekend I cleaned up the implementation quite a bit, including switching from the “undispatch” method to using continuation listeners, which allowed me to simplify the code a ton. I have done this for both Openfire and the connection manager module. I’m doing some more testing on this stuff, but I’ll come back and update you all with my results, and post the code if it all works out!
Curiously - How many people do you have online using BOSH when it is failing? We average about 1000-2000 people on BOSH and about 5000+ using socket at any time. They are connecting using a modified XIFF client. Since we applied the above patch our Openfire server has been a lot more stable.
During the week we have about 25,000 concurrent users, and on weekends 33k-35k. I think one of the main differences that we have is our users are all using MUC, with ~200-250 users per room. I’m wondering if that is aggrivating things. It doesn’t seem to make much of a difference how many users are connected with BOSH, we have had problems with as few as 200
Are you also going to be updating the MINA libraries to 1.1.7 ?
This helped some issues for us. There are a few minor code changes to do this but I am happy to clearly document it in a new thread if that is helpful.
Although its covered in other discussions it’s all very scattered.
Please note that Openfire does not use the “standard” Mina 1.1.7 due to a bug that affects Openfire. Gato has used a fork of Mina 1.1.7 for OF lately. The patch and bug is documented here: http://www.igniterealtime.org/issues/browse/JM-1115.
Any update of MINA may want to check, if the patch is included in the latest MINA. AFAIK the patch was submitted to the MINA project by Gato, but I do not know the result of that.