GSoC Project Successfully Completed

I am proud to announce that I have successfully completed my Google Summer of Code Project. As we hit the official pencils down date, I thought it might be good to publish results and final toughts.

I started the project in time and completed it 3 working days later than planned, though it could require more effort if we didn't change our goals. I cooperated with Tomas and Tobias to fix the flaws I couldn't notice during development.

It was a wonderful experience to work on Openfire and SparkWeb, especially with my mentor Gaston. Even if my GSoC project is complete, I feel there'll always be something to do for me with Jabber. I am having fun with Jabber, and planning to continue working on Jabber development as a community contributor.

I would like to thank Google for giving me such a great opportunity. I also thank David Smith and Peter Saint-Andre for their excellent support.

See you around!

XIFF (and SparkWeb) now support BOSH 1.6

I have updated the XIFF library to be compatible with BOSH 1.6. As SparkWeb is based on XIFF, most of the information here also applies to SparkWeb. Main good news are:

  • Login phase and communication using BOSH is noticeably faster thanks to new overactivity rules of 1.6.
  • BOSH connection is tested and working with Openfire, Tigase and ejabberd.

Additional Work

  • Added logging support to XIFF using Flex logging API (mx.logging).
  • Moved SASL logic from XMPPBOSHConnection to XMPPConnection, so now both connection types (BOSH and socket) share the same authentication code. Previously, socket connection was using non-SASL authentication.
  • Cleaned up some dead code and made BOSH connection class more configurable.
  • Fixed a few Openfire BOSH issues that appeared when testing XIFF.

Known Issues

This updated version of XIFF will be fully compatible with the updated Openfire and Openfire's BOSH update will be included in version 3.6.x. However,  there is an issue with Openfire versions released before the update.

According to XEP-0206, after a successful authentication, clients should send a body with xmpp:restart attribute set to true. But older Openfire versions do not recognize xmpp:restart, handling the request as if it was a polling request. Thus, it responds to the client after 30 seconds.

If you use the updated version of XIFF or SparkWeb with a version of Openfire that does not support BOSH 1.6 (i.e. lower than 3.6), please be aware that you will be experiencing a latency of 30 seconds during logins.

Roadmap Revised

After an investigation about the migration to Apache MINA, I have found that MINA could be insufficent to meet our needs. We needed at least a lightweight HTTP engine, and a servlet launcher engine, because Openfire uses servlets to handle BOSH requests. During my search, I came upon grizzly, which could be a good alternative for us. It has an HTTP engine and a servlet launcher engine built in. However, we needed to make scalability test to be sure about its performance, and these tests could take some time. That's why I deferred working on Openfire's BOSH connection manager.

By the way, my mentor Gaston offered me to do the BOSH update also on the client side. So, I will be working on SparkWeb's BOSH implementation from now on.

Openfire Update to BOSH 1.6 Complete

I updated Openfire's BOSH code to support both versions 1.5 and 1.6. Thanks to the Openfire team, an initial work was done before for 1.6 support, which made my work a bit easier. On the other hand, in-order message forwarding was not working correctly, even if it's specified in the version 1.5 of the XEP, and that took me a long time to get done.

Here is an outline of what I did:

  • Added 'hold' and 'ver' attributes to the session creation response.
  • Fixed version checking. Before it was done using a double variable, which may show that 1.5 is newer than 1.10.
  • Script syntax support has already been added before. Finetuned it to prevent caching of responses.
  • Implemented in-order message forwarding (JM-1412), because further work seemed to be depend on this implementation. This is the part that took most of my time, also which made me to get more familiar with the code after long debugging sessions.
  • Implemented acknowledgements, which was intoduced in version 1.6.
  • Added support for session pauses, which was also new for 1.6.
  • Implemented overactivity checking. In 1.5, there was only 'polling too-frequently error', and a little description about it. Version 1.6 introduced a new section for overactivity, and has a detailed description of which circumstances should be considered overactivity.

Load Testing BOSH on Openfire

Finally I have come up with some results :) . During the preparation and the testing process, I have experienced much more difficulties than I expected. Some of these were due to lack of adequate hardware resources, while others were caused by the limitations of the testing environment, The Grinder.

Continue Reading »

Project Roadmap & Schedule

By choosing a load testing framework, we have hit our first milestone :) . We have defined our subsequent milestones as follows:

  1. Build load-test environment
  2. Do load testing on the current version and obtain benchmarks (includes profiling on Java code and identification of bottlenecks)
  3. Update BOSH implementation to 1.6
  4. Load-test and obtain benchmarks (repetition of step #2)
  5. Make BOSH implementation work with Apache MINA (based on #2)
  6. Load-test, obtain benchmarks and finetune (repetition of step #2)

If things work out as planned, I will be completing the project in 8 weeks, starting at the beginning of June. We also think about some fancy stuff to do, in case everything goes even better that I will have time after completing this project. Here is my schedule (iCal):

Choosing a Load Testing Framework

Before working on a timeline, we had to identify the unknown part of the project: load testing. We plan to do load testing, benchmarking and fine tuning frequently; so getting detailed information about how we can do load testing and what kind of problems we may encounter will provide us a better insight for our future work. For this purpose, I began to examine load testing frameworks.

The most popular ones I came up with were OpenSTA, JTRunner, Apache JMeter and The Grinder. I've eliminated OpenSTA because it only supports Win32 platforms, and JTRunner because of its complexity and lack of documentation. After that, it was hard to come to a conclusion between JMeter and The Grinder, because both were mature and feature-rich frameworks. After an in-depth comparison, we decided to go with The Grinder, mainly because of its comprehensive documentation and Python scripting support.

Hello GSoC! – An Introduction

This summer, I am participating in the Google Summer of Code, as my proposal to the XMPP Standards Foundation has been accepted. You can view an abstract of my application here.

The Extensible Messaging and Presence Protocol (XMPP) is an open and powerful XML technology for real-time communication, widely mentioned as the future of online messaging and presence. XSF is the community shaping the XMPP standarts. It sounds exciting to develop open source software in collaboration with such a great community.

From April 21 to May 26 is the community bonding period, giving students the opportunity to learn about the organization's processes, get in contact with the community and also read some documentation.

The people at Jabber already welcomed us very warm. Peter Saint-Andre has sent copies of the books "The Pragmatic Programmer" and "Getting Things Done" to all of the XMPP GSoC students. Also my mentor Gaston Dombiak has been very kind to me since I first contacted him about my proposal.

I will be working on Updating and Improving BOSH Support of Openfire, which is considered one of the most popular Jabber servers. One thing to note is, that it is the only server-side project in XSF among the proposals accepted in 2008. Tomas Karasek is also working on BOSH support for Gajim. Links to other XSF GSoC students' blogs are in my blogroll.

Contact

I'll try to be in jdev chat room (huni) during my GSoC work. You can also contact me via email or jabber at:

jabberid