Hi thanks for this great module! In preparing for a drupalcamp demonstration I started hacking away at the module (drupalconlondon branch; i.e. with tokenChannels).
IMHO it would be very useful if server extensions could communicate back to Drupal modules via the server.js:sendMessageToBackend-function. This requires passing the reference to the SSJS-extensions (maybe full access server.js-module scope?) and an the introduction of an additional hook in the nodejs.module:nodejs_message_handler-function to be able to handle custom messageType in Drupal-contrib modules. A small patch attached.
I "created" a hook_nodejs_message_handlers()-hook - which works ok, but (architecturally) probably raises more questions than it solves (multiple modules replying w/ multiple responses etc.).
| Comment | File | Size | Author |
|---|---|---|---|
| nodejs_additional_hook_nodejs_message_handlers.patch | 1.58 KB | frega |
Comments
Comment #1
jaydub commentedComment #2
Anonymous (not verified) commentedi like this, but need a bit more time to digest the implementation. will circle back to it tomorrow, thanks for the patch.
Comment #3
Anonymous (not verified) commentedok, committed a revised version: thanks!
really interested to see what you are planning to do with this :-)
http://drupalcode.org/project/nodejs.git/commit/c918aad