Smack 3.0 Plans

Hey all,

For those of you tracking the Smack repository over the past couple days, you’‘ll have noticed the start of some very large refactoring work. It’'s all the start of our work on Smack 3.0. What is Smack 3.0? Glad you asked.

  • Conversion to JDK 1.5. Two years after the JDK was released, it’‘s time to upgrade. If you’‘re still stuck on 1.4 – first, I offer you my sympathy. Second, we’'ll keep backporting bug fixes to 2.x for a time. Even after just a few hours of work, the new JDK 1.5 syntax has let us do a lot of code cleanup.

  • Removal of some crusty functionality. SSLXMPPConnection is out-dated now that TLS support is in all servers. The GroupChat class is out-dated now that MUC support is everywhere.

  • Clearer definition of smack vs. smackx. The smack package will only contain functionality that’‘s part of the XMPP IETF standard (as much as possible). The smackx package will contain support for JEP’'s defined by the JSF.

  • Fix some very broken things in the code. The two that come to mind are the inability to listen for new chats in any reasonable way, and the fact that there is a “leak” if messages aren’'t processed through the packet collectors of the Chat and MultiUserChat classes.

  • New features. One new feature we’‘re planning that I’'m particular excited about is much better re-connection support. From built-in automatic re-connect support to API changes that will allow an XMPPConnection object to be re-used.

The plan is to complete all of these changes at the same time Wildfire 3.1 is being released (very end of August).

Regards,

Matt

matt wrote:

For those of you tracking the Smack repository over the past couple days, you’‘ll have noticed the start of some very large refactoring work. It’'s all the start of our work on Smack 3.0.

Great!

  • Removal of some crusty functionality. SSLXMPPConnection is out-dated now that TLS support is in all servers. The GroupChat class is out-dated now that MUC support is everywhere.

Well, according to this page, OpenIM and jabberd 1.x still don’‘t support TLS. However, I’'ve decided to drop SSL-support from my client, too.

  • Clearer definition of smack vs. smackx. The smack package will only contain functionality that’‘s part of the XMPP IETF standard (as much as possible). The smackx package will contain support for JEP’'s defined by the JSF.

It’'d be nice if the javadocs would specify for each class what JEP it implements.

  • Fix some very broken things in the code. The two that come to mind are the inability to listen for new chats in any reasonable way, and the fact that there is a “leak” if messages aren’'t processed through the packet collectors of the Chat and MultiUserChat classes.

Fixing the race conditions I’'ve reported would be nice, too.

The plan is to complete all of these changes at the same time Wildfire 3.1 is being released (very end of August).

hm… that’‘s a bad timeframe, since that’‘s right when Google Summer of Code ends, which would mean that Adium would’'t be using it. Maybe I could use some nightly before that to port everything over?

btw, a very nice new feature would be Link-Local Messaging (JEP-0174). This one requires pretty deep changes in Smack itself (adding a listener etc), which I’'d like to avoid to do myself if possible.

You could use Apple’'s package for this: http://www.onjava.com/pub/a/onjava/excerpt/bonjour_ch08/index.html

We should have usable code way before the end of August as we’'re planning on using it in the latest version of Spark, due out in several weeks.

matt wrote:

  • Fix some very broken things in the code. The two that come to mind are the inability to listen for new chats in any reasonable way

I think that explains why I was having a hard time finding out how to listen for new chats. What is the current best / easiest way to do so?

Josh,

At the moment, your best bet is to not use the Chat object and to add a packet listener for all messages. That’'s what we do in Spark, for example.

Regards,

Matt

Thanks!

Same goes for presence subscribe[d]/unsubscribe[d] and offline status apparently.