My case is closer to the second pattern. The vast majority of times, the app returns data to the browser only (via socket.io) and then it's rendered by jquery (so it never touches php / mysql). There will be some rare occasions when node.js returns data to Drupal, and that's when Services come into play (as the data will be JSON and drupal_services can read that).
Finally, the question still is - should drupal_services (on those rare occasions) handle multiple clients (socket.io clients) or just one (socket.io server)? W dniu piątek, 15 czerwca 2012 12:37:50 UTC+2 użytkownik ajlopez napisał: > > Just to have a clear image... > > Your case is: > > Browser calls web app Drupal > then Drupal/PHP calls node.js > node.js returns something TO Drupal > Drupal render a result to browser > > Am I right? > > I see another pattern, too: > 1- Browser calls web app Drupal > 2- then Browser calls node.js > > An example: social game. Step 1 is for login, making the room, ... Step 2 > for game plays. > > On Fri, Jun 15, 2012 at 5:35 AM, trewebs <[email protected]> wrote: > >> I am creating an app in Node.js and will be using it through socket.io. >> The app will be connected to Drupal using the module Drupal_services. >> Now my question is -> considering that most of the functionality is >> node.js and mongoDB based and only a few functions will touch Drupal >> (registration, login, blog-comments) --- should Drupal_Services connect to >> socket.io clients or socket.io server? >> >> References to problem analysis are most wanted :) >> >> -- >> Job Board: http://jobs.nodejs.org/ >> Posting guidelines: >> https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines >> You received this message because you are subscribed to the Google >> Groups "nodejs" group. >> To post to this group, send email to [email protected] >> To unsubscribe from this group, send email to >> [email protected] >> For more options, visit this group at >> http://groups.google.com/group/nodejs?hl=en?hl=en >> > > -- Job Board: http://jobs.nodejs.org/ Posting guidelines: https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines You received this message because you are subscribed to the Google Groups "nodejs" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/nodejs?hl=en?hl=en
