cancel
Showing results for 
Search instead for 
Did you mean: 

Support for XMPP?

samuel_penn
Champ in-the-making
Champ in-the-making
Hi all,

I'm currently having a play with Alfresco 2.9B, and I notice that it has some support for IM presence information. However, this seems to be currently limited to Skype and Yahoo. Are there any plans to support XMPP in the near future? If so, is there a timeframe for this?

Given that XMPP is open and free, and Alfresco seems to be aimed towards supporting open standards, was there any reason not to include XMPP support initially, or was it just the case that none of the developers use it so didn't think about supporting it?

I also notice the forum software doesn't allow you to specific an XMPP id… 😞

Thanks,
Sam (who's only ever used XMPP for IM, unless you include the old UNIX talk application).
8 REPLIES 8

protenus
Champ in-the-making
Champ in-the-making
We are also looking for xmpp integration. Perhaps will start working on implementing that ourselves, can someone steer us towards docs on how to implement an XMPP handler for the presence module?

mikeh
Star Contributor
Star Contributor
Hi both

Support for presence information in Alfresco 2.9 is pretty basic at the moment. The reason Skype and Yahoo were chosen was for two reasons:
1 - we use them extensively internally, and
2 - far more importantly, they both provide a facility for retrieving contact status via well-known public HTTP GET requests.

The problem with all other IM services (as far as I'm aware) is that the status never leaves the IM protocol's network. In other words, you must be running an IM client of some sort, be logged onto the network and be a buddy of the person you're trying to find status for before that information becomes available. People have done this programatically by creating dummy generic users which everyone adds to their buddy list. This generic user then receives and re-publishes status updates to the custom application.

The current Alfresco implementation fires off AJAX requests (via a proxy service within the repo) to the Skype and/or Yahoo servers. The response is interpreted by client-side Javascript and the UI updated accordingly. This approach also has the distinct advantage of not tying the server up during page rendering.

In order to do IM "properly" within Alfresco, you'd need to create one or more of these generic users which log-on to the IM networks of interest upon start-up. Your users would then manually add these contacts to their own IM clients and you'd provide some kind of API to publish their status in the Web Client. This kind of implementation was (and still is) beyond the scope of what we wanted to provide in Alfresco at this stage, without having a clear demand from our Enterprise customers.

Thanks,
Mike

samuel_penn
Champ in-the-making
Champ in-the-making
Thanks Mike for the reply. It seems a sensible reason to have concentrated on those two, and it matches my understanding of how XMPP works (I'm actually surprised Yahoo/Skype allow anyone to view your presence, since I'd expect it to be hidden from strangers for privacy reasons). I guess then that unless someone comes up with a real requirement (other that, "it would be nice", which is the most I can give you) or takes on the job themselves, XMPP support is way off in the future.

In theory, if a web interface existed that allowed Alfresco to poll the status of XMPP users, would it be easy to add support into Alfresco?

If someone does have the time, it looks like something very similar to Mike's suggestion is done here with dummy users:

http://confluence.atlassian.com/display/CONFEXT/IM+Presence+Plugin

At least it supports a couple of XMPP implementations (judging by the comments, it's a configuration limitation which limits it to GTalk rather than generic XMPP).

Thanks again Mike for your quick response,
Sam.

mikeh
Star Contributor
Star Contributor
Hi Sam

I'm actually surprised Yahoo/Skype allow anyone to view your presence, since I'd expect it to be hidden from strangers for privacy reasons
Good point - actually, they are hidden by default. You have to explicitly set options in the respective clients along the lines of "publish my presence status".

In theory, if a web interface existed that allowed Alfresco to poll the status of XMPP users, would it be easy to add support into Alfresco?
Reasonably easy, yes. Most of the work is done within a client-side script, but there are a couple of places in the web client where "skype" and "yahoo" are hard-coded where they shouldn't be; so it's a little more work than just some extra config.

We had a look at the Atlassian offering but as I mentioned above, the work quickly expanded out of scope considering the config and customization that we'd be expected to provide. Looks like a great starting point though.

Thanks,
Mike

protenus
Champ in-the-making
Champ in-the-making
Since Openfire (an opensource XMPP server) provides an HTTP presence interface, perhaps integration with OpenFire would be a first step.

samuel_penn
Champ in-the-making
Champ in-the-making
The problem with integrating with OpenFire is that you then only support OpenFire, and have to then write integration for ejabberd, then jabberd2, then GTalk etc. Unless you can ensure that it's going to be implemented in the same way on all XMPP servers, it's a lot of work.

It may be better to write a web service which logs on as a user, and manages connections itself, as Mike suggested. I've been playing around with the Smack APIs from Jive Software this morning, and have a very simple interface which returns the user's status in response to a GET request. It logs in as a dummy account to a server, and automatically requests permission from a user the first time their status is requested via the web interface.

In theory, this should work against any XMPP server, though I've only tested it against ejabberd and GTalk. It's currently implemented as a standalone webapp, and uses a ServletContextListener to login and discount the dummy account when Tomcat starts/shutsdown. Not sure whether this would be better to implement as a webscript within Alfresco.

I've got my own uses for this, but would it be worth making it 'Alfresco-friendly'? If so, is there any documentation available on what the interface should provide?

Sam.

lopot
Champ in-the-making
Champ in-the-making
Hi, is posible to integrate ICQ presence. ICQ shud should HTTP publish presence so i think its should  be easy to intergate it. If you do I'l be very pleased. Thanks

mricher
Champ in-the-making
Champ in-the-making
Was thinking along the lines of:

http://xmpp.org/extensions/xep-0151.html

Althought it is currently deferred.. seems like a reasonable implementation of presence/avatar information on a web site.

Might tie in with:

http://www.theserverside.com/tt/articles/article.tss?l=IntegratingPresenceJ2EEEnvironments

But I'm not a programmer… just throwing ideas out…

Cheers