Facebook chat, which this closely resembles in look and feel and functionality, has persistence across page loads. By that I mean, if I'm chatting with you, and I click on a link on the page, I jump to that page, but don't lose the chat with you. This feature would rock my world in this application.

Comments

ManyNancy’s picture

Ajaxim does the same thing:
http://ajaxim.com

aaron’s picture

yes! persistent sessions (probably using pre-authentication) is on the hit list for development.

@manynancy: that looks really interesting; seems they're using node.js to create its own webserver... thanks for linking to that resource!

srjosh’s picture

What's the timeframe, and can we help? If so, how?

ManyNancy’s picture

I've talked to the guy from ajaxim, and he offered to integrate it with drupal/UR for $750 in 2 weeks.

I highly prefer node.js/json over xmpp/strobe/erlang. But if xmpp is a requirement, there are 2 options:
http://github.com/astro/node-xmpp
http://github.com/mwild1/xmppjs

Anyway it's not a requirement for me.

If there are other people who are extremely impatient and want to put some money together. IMO this is an option.

aaron’s picture

i had been looking at http://metajack.im/2009/12/14/fastest-xmpp-sessions-with-http-prebinding/ and http://github.com/thepug/Mod-Http-Pre-Bind as possibilities, although that is ejabberd specific, and requires recompiling one of the ejabberd libraries.

doesn't matter much to me which way we go; ideally we could implement more than one and give the option.

i had not been aware of node.js when i started this project, and am very excited about its possibilities. not sure how it would fit in the scope of this, as this module is definitely (currently) very xmpp specific...

aaron’s picture

nice; i see that the latest release of ejabberd at http://www.ejabberd.im/ejabberd-2.1.4 has made pre-authentication easier, so that one no longer has to hack ejabberd to make it work (used to need to export some function arguments in erl for that)

ManyNancy’s picture

I guess you can make node an optional backend, when you have some time to look at it, through integration with one of the aforementioned xmpp libraries. Since I'm using node elsewhere, I would eventually like see dxmpp use it, and perhaps see the use of websockets (http://socket.io) rather than comet, as well as other things, :P but since ejabberd works currently, I guess focus on front end issues for now?

As for as the window persistence issue goes, for me the most elegant solution would be to use localstorage, but other people might have different requirements... ie, IE7/6.

aaron’s picture

Assigned: Unassigned » darklrd
Issue tags: +gsoc2010

assigning to darklrd to investigate the possibility of integration of node.js, after some discussion on IRC (as long as too much time isn't spent burning on it, since it's slightly out of scope of the original gsoc proposal). thanks, @ManyNancy!

ManyNancy’s picture

Whoot, thanks.

Flying Drupalist’s picture

So this is in drupalchat.

Also +1 node.js and websocket.

franskuipers’s picture

StatusFileSize
new6.84 KB

Partly solved..... more or less.

I was thinking it should be possible to open a connection for the user (http-pre-bind is mostly used for anonymous connections) on the server, and attach that connection in the client javascript.

After a lot of searching I found a script that opens a connection and binds the session. The patch will show that the connection is rightly attached, the client gets the roster, and we can communicate with other users as long as we stay on the first page.

After browsing to the next page, strophe will not report back roster/presence events anymore. I can see we are sending the roster-iq en presence, we get an anwer from ejabberd, but our handlers are not called. We still can communicate from another user to us (if we don't wait to long, the session where we browsed to an new page will time out), and we can reply on that message.

I have tried everything in my power to get it working after browsing to the next page, but I can't find a solution for it. I hope someone else can.

franskuipers’s picture

StatusFileSize
new10.47 KB

Forget the patch in #11, misses an important file.

Fidelix’s picture

Subscribing...

rjbrown99’s picture

Status: Active » Needs review

There's a patch here, so I'm going to update the status.

IckZ’s picture

Subscribing! This is a must have feature for this great module!

rjbrown99’s picture

I had another thought - how about just popping the chat out into its own window? Then it's independent of whatever other on-page actions take place since it has a dedicated window. It's cheating a bit, but it's also easier to implement.