I've been investigating node.js lately. It looks like like a great and simple platform for building realtime collaboration type apps such as chatroom. See for example this post about how Plurk is now powering 100,000s of users communications over comet: http://amix.dk/blog/post/19490#Plurk-Instant-conversations-using-comet
Also, see the demo chatroom built on node.js: http://chat.nodejs.org/
Using node.js as an optional backend to Chatroom would go a long ways toward alleviating performance problems seen by some + significantly speed up message passing as Chatroom could now use comet vs. ajax polling.
What do you think?
I'm just throwing out ideas right now. I won't have time to write any code on this for quite awhile but I think this would be a really valuable approach and would love to help out at some point in the future.
Comments
Comment #1
Anonymous (not verified) CreditAttribution: Anonymous commentedi'm interested in exploring a backend that's not the standard LAMP stack, but i don't want to lose the tight integration aspects of a "standard" drupal module and its data.
i've actually toyed with building a prototype pub-sub setup using Apache ActiveMQ as the backend that clients connect to for the very-frequent-read operations.
the idea is that all write operations go via drupal, which writes out messages to the appropriate channel, and ActiveMQ (or some other similar backend) handles the real time updates. this model is a bit more complicated, but keeps the tight integration (all data is written to the drupal db and exposed to the full hook system), but the real-time keep-an-open-socket stuff is handled by another backend.
any interest in that sort of design?
Comment #2
kyle_mathews CreditAttribution: kyle_mathews commentedI'd also suggest, if anything ever comes of this idea, that we use Socket.io. I was playing around w/ it yesterday and their sample chat room application and in about 20-30 lines of code, they've built a highly scalable, simple, hackable chatroom. Check out the code sometime from http://github.com/LearnBoost/Socket.IO and take it for a spin.
Comment #3
synodinos CreditAttribution: synodinos commentedYou can check out nodepal - A Drupal integration layer for Node.js developers
This is a module that allows the integration of a Drupal installation with a custom Node.js app. It provides an API so that Node.js developers can directly read and write in Drupal's repository, using constracts like node, user, permission, etc., with having to worry about the underlying implementation and setup of the Drupal installation.
Use Cases:
Comment #4
Anonymous (not verified) CreditAttribution: Anonymous commented@synodinos - nice, i'll take a look.
Comment #5
afeijoAlso check this other new drupal module nodejs
very promissing, I'll definitely use it :)
Comment #6
rogical CreditAttribution: rogical commented+1 hope to see the D7 version of chartroom integrate with nodejs
Comment #7
superfedya CreditAttribution: superfedya commentedA lot of person use Drupal 6, so they will be very happy with nodejs in 6.x version too.