Loading presentation...

Present Remotely

Send the link below via email or IM


Present to your audience

Start remote presentation

  • Invited audience members will follow you as you navigate and present
  • People invited to a presentation do not need a Prezi account
  • This link expires 10 minutes after you close the presentation
  • A maximum of 30 users can follow your presentation
  • Learn more about this feature in our knowledge base article

Do you really want to delete this prezi?

Neither you, nor the coeditors you shared it with will be able to recover it again.


Drupal and node.js integration (DrupalCamp Twin Cities)

No description

Joe Turgeon

on 3 June 2011

Comments (0)

Please log in to add your comment.

Report abuse

Transcript of Drupal and node.js integration (DrupalCamp Twin Cities)

Drupal and node.js What is node.js? node.js = Google's V8
engine + system libraries events timers file system network TCP/UDP HTTP/S extensions MySQL socket.io express Joe Turgeon
@arithmetric DrupalCamp Twin Cities
May 2011 node.js is especially good at multi-user, real-time applications DEMO http://chat.nodejs.org SEE ALSO http://64sq.com Why use node.js? For building web services, node.js is an alternative to Apache and PHP node.js is better suited for some use cases Handles many concurrent, persistent (keep alive) connections Allows push communication with JavaScript clients (instead of polling) How can node.js compliment Drupal? Providing real-time notifications for events: Pushing messages instantaneously to mobile devices chat
control panel application
group/social notifications node.js integration module for Drupal Created in 2011 by Justin Randell

BOFs and code sprints at DrupalCon Chicago

Beta 1 released April 28

Drupal 6 port started recently nodejs is an API module that allows other Drupal modules to use a node.js server for pushing messages to users It includes a few extra modules that demonstrate its basic functionality: Provides an "action" to send messages via the node.js service for triggers

Basic functionality for subscribing to a node and receiving update notifications via the node.js service

UI module for growl-like notifications DEMO Technical details about node.js In node.js, system calls and I/O are asynchronous Instead of waiting, node.js moves on to the next event A single instance of a node.js program can handle many connections Data is easily shared and accessible across connections
(so there is less need for an external data store) nodejs Module Architecture The node.js service is limited to receiving messages from Drupal and pushing to appropriate clients The nodejs module has the concept of "channels" that users can be added to or removed from Other Drupal modules can create a channel, specify which users should be part of the channel, and send messages to the channel This design is meant to allow a simple integration path for other modules How can developers extend the nodejs module? Hooks hook_nodejs_auth_check()


hook_nodejs_user_channels() Helper functions Server extensions nodejs_add_user_to_channel()






nodejs_send_role_message() Extend the node.js service to perform processing on the messages to/from the Drupal site and to/from clients. DEMO What are future directions for development? Enhance existing functionality with real-time notifications delivered by a node service

Custom applications where Drupal uses a node service as a hub for user interaction How can you get involved? Test it and try to apply it

Report bugs and help fix outstanding issues

Get involved in the Drupal group

Help think about future goals For more information nodejs Drupal module:

node.js Drupal group:



This presentation:
http://bit.ly/dctc-nodejs http://bit.ly/dctc-nodejs-tictactoe http://bit.ly/dctc-nodejs-demo
Full transcript