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.).

Comments

jaydub’s picture

Status: Active » Needs review
Anonymous’s picture

i like this, but need a bit more time to digest the implementation. will circle back to it tomorrow, thanks for the patch.

Anonymous’s picture

Status: Needs review » Fixed

ok, 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

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

  • Commit c918aad on 7.x-1.x, auth-refactor, 8.x-1.x, 8.x-1.x-head by beejeebus:
    #1273124 by frega, beejeebus: Enable javascript server extensions to use...