powered by Jive Software

PubSub Support in Smack

As far as I can see there is no support currently in the Smack library itself for PubSub (JEP-0060).

Seems like the best library to use is su-smack (http://freshmeat.net/projects/su-smack/)

  1. Is my assumptions above correct?

  2. Is the idea to merge su-smack into the Smack extensions itself (smackx.jar)?

  3. If #2 above is true, will it be a straight-forward port into org.jivesoftware.smackx packages, or are you considering a re-implementation of PubSub. I don’t find any reference to PubSub support on the Issue Navigator for Smack (http://www.igniterealtime.org/issues/browse/SMACK)

su-smack is an extension library that is build on smack. Just put it on the classpath.

I’ve done some development (spark plugin) with su-smack (with some enhancements and changes that are not in the current su-smack that can be downloaded from the web) and PubSub some months ago. But I discovered a problem with the current implementation of spark that connects to the server before all plugins are loaded and therefore the packet listener for the PubSub plugin is registered after the server has already sent the pending messages and therefore I never got the messages that were changed while the user was not online.

akuhtz wrote:

su-smack is an extension library that is build on smack. Just put it on the classpath.

Thanks - I am aware of that. This is exactly my question. Is it in die smack development roadmap to implement PubSub as part of the smack extensions (smack codebase)? And if so, is this going to be a cleanroom implementation, or do you foresee that su-smack be ported into the smack codebase?

I’ve done some development (spark plugin) with su-smack (with some enhancements and changes that are not in the current su-smack that can be downloaded from the web) and PubSub some months ago. But I discovered a problem with the current implementation of spark that connects to the server before all plugins are loaded and therefore the packet listener for the PubSub plugin is registered after the server has already sent the pending messages and therefore I never got the messages that were changed while the user was not online.

I think this is exactly the kind of problems which could be adressed easier if su-smack (or a cleanroom implementation of PubSub) is integrated with the smack libraries.

I see other discussions where people are extending / changing su-smack themselves to implement / fix certain features.

As an example: http://www.igniterealtime.org/community/thread/31570?tstart=0

This would be a good reason for implementing JEP-0060 as an extension inside smack right?

I see quite a lot of discussions around this same question but they never get answered. Examples:

Could one of the main committers on the Smack library comment on the roadmap for this support?

I would also not mind helping to implement this in Smack.

About 2 years ago, I developed a PubSub client library for Smack as Jive was developing PubSub for what was then WildFire. I worked closely with the Jive guys and was basically testing their server implemenation of PubSub. I submitted to them what was probably a 90% client PubSub solution. It never made it into Smack. About a year ago, someone on this forum brought up Smack and PubSub. I sent them the code I had written. I have no idea what they did with it - it wasn’t one of the Jive developers.

The project I was working on, moved away from using PubSub as it just wasn’t a good fit. We tried to get the PubSub spec modified to help fit our needs, but that didn’t happen.

Anyways, I have a chunk of code that I’m sure could use some reworking, but it does most of the heavy lifting that is required.

If anyone would like to have the code, shoot me an email - pouncep@hotmail.com

-Pony

P.S. The code was written against Smack 2.x and is Java 1.4x compliant.

Hi,

We have done some pubsub file sharing using the http://static.devel.it.su.se/su-smack/ API. Has anyone extended su-smack to support PEP? It would be nice to have PEP-based extended presence caps (e.g. geolocation) supported in the client.

Michael

Maybe I’m just not looking in the right places but it doesn’t seem like su-smack is actively maintained anymore?

Project site: http://static.devel.it.su.se/su-smack

Freshmeat: http://freshmeat.net/projects/su-smack/

Jars: http://maven.it.su.se/it.su.se/maven/su-smack/jars/

Hence my question on integrating either su-smack into jive’s smackx, or re-developing from scratch previously in this thread.

PouncePony actually forwarded me a client-side implementation of pubusb they developed. Still need to have a proper look, but then need some guidance from smack maintainers on how we should go ahead with finalizing a pubsub implementation in smackx…

The last change in SVN was October 2007. The lib may still be maintained!!?

su-smack is linked to xmppjca which is a JCA 1.5 resource adaptor for XMPP. “The java connector architecture (JCA) is a specification for managing connections to enterprise information services from a J2EE application container. This project implements a so called resource adapter for interfacing with XMPP servers.This allows the development of EJBs that acts as XMPP clients.”

http://devel.it.su.se/pub/jsp/polopoly.jsp?d=1048

I have put in an updated contribution as well for pubsub support in smack which has a simplified API for using pubsub.