Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
A hacky implementation of this lives in 7.x-1.x.
The 7.x-2.x branch will do this properly, removing all notions of polling throughout the front end js code and the backend code.
For js, this means all data from the server will be pushed, and JS code should be altered to suit.
For the backend code, this means all data for clients will be pushed to a node.js backend.
Comment | File | Size | Author |
---|---|---|---|
#9 | improve-documention-node-js-backend.patch | 1.82 KB | markwk |
Comments
Comment #1
markwk CreditAttribution: markwk commentedCurrent status? Try to figure out how it's working / hack on it, but can't figure what's up so far.
Comment #2
darklrd CreditAttribution: darklrd commentedIntegration has already been done with nodejs module. First setup your node.js server as mentioned in nodejs module's README.TXT. After that you can set the Chatroom to use node.js as backend by going to Chatroom module's setting page.
Comment #3
markwk CreditAttribution: markwk commentedThanks for the quick response. Which branch should I be using? GSOC2011?
Comment #4
darklrd CreditAttribution: darklrd commentedYes, please use gsoc2011 branch.
Comment #5
markwk CreditAttribution: markwk commentedCool. I got it up and running. I opened up the code and it was a bit hard to follow. There is still a mix of node.js method and ajax polling method.
I'm thinking of backporting or adapting parts of this to Drupal 6. Any chance we could scrap this old ajax code and work just with the node.js stuff?
It seems like a lot of the configuration isn't necessary in the context of node.js.
Comment #6
darklrd CreditAttribution: darklrd commentedThe mix of ajax and node.js methods is necessary to keep the site's drupal DB in sync. While posting, when someone sends a chat message, ajax method is used and thereby chat messages are logged in the DB. And simultaneously this new chat message is published on a node.js channel too. For receiving new chat message updates only node.js backend is used. The main load on a website, when using a chat framework, is essentially due to polling for new messages which in this workflow is handled by node.js only. Hope this clarifies your question.
Comment #7
markwk CreditAttribution: markwk commentedAh! Yeah, I get it now. It's in fact not all entirely done on the node.js end because there is the ajax that sends it to the db. Thanks for clarifying this.
Have you even gotten this to work with a service like no.de? I got it working locally but wanted to try it there, but not quite working.
Comment #8
darklrd CreditAttribution: darklrd commentedNo, I haven't tried it like this. It should work though. What is the issue?
Comment #9
markwk CreditAttribution: markwk commentedHere's a small patch to improve documentation for the node.js integrated chatroom.
Comment #10
markwk CreditAttribution: markwk commentedThis was the issue I got in no.de log:
[ Sep 17 20:57:24 Method "start" exited with status 0. ]
I'm not sure sure what that means.
Comment #11
Anonymous (not verified) CreditAttribution: Anonymous commentedre. #9.
don't start there, start with the 6.x-3.x branch.
Comment #12
Anonymous (not verified) CreditAttribution: Anonymous commentedComment #13
langworthy CreditAttribution: langworthy commentedI think we can mark this fixed?
Comment #14
SeanBannister CreditAttribution: SeanBannister commentedComment #15.0
(not verified) CreditAttribution: commentedLong overdue summary update.