Closed (fixed)
Project:
Node.js integration
Version:
7.x-1.0-rc1
Component:
Code
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
11 May 2012 at 22:12 UTC
Updated:
12 Dec 2015 at 21:04 UTC
Jump to comment: Most recent
Comments
Comment #1
denny84 commentedCorrection:
* DB queries
not bs queries
Comment #2
pribeh commentedThis would make a lot of sense since mongodb works with json. subscribe.
Comment #3
Anonymous (not verified) commentedno, i'm not really interested in doing this.
however, i'd consider allowing modules to provide their own tokens.
Comment #4
michee.lengronneI think it would be a good idea for a huge performance system to allow the nodejs server to query directly in mongodb.
It can be a common module dev between that module and the http://drupal.org/project/mongodb ?
Comment #5
Anonymous (not verified) commentednope.
Comment #6
Anonymous (not verified) commentedIt's a shame the maintainer has no interest in this; it would be an excellent feature. As it is I am at the moment faced with the dilemma of either abandoning the Redis cache backend I am using for sessions (by means of the Session Proxy module) or forgoing the use of this module.
Supposing I want to get this to work. This was mentioned: 'however, i'd consider allowing modules to provide their own tokens.' What would that entail, roughly?
Comment #7
Anonymous (not verified) commentedFor anyone wanting to use a NoSQL session backend with this module, here's how I did it.
I had to abandon Redis for session storage since it stores sessions in a manner very different from Drupal's core sessions. However, the MongoDB module's session backend is feasible, although I had to make a small patch to it.
The incompatibility of the nodejs module with other session backends lies in this function from nodejs.module, since it's a hard-coded db_query:
This can be changed to a PHP MongoDB driver query to a MongoDB session storage collection. However, I couldn't find a Mongo equivalent to the MD5 in MySQL, so I had to do the md5 checksums in the MongoDB module & store them in the session documents instead. Here are the necessary changes to the mongodb_session.inc in the MongoDB module:
Finally, the new function in nodejs.module:
I know this won't be added to either module, but thought I'd share a useful hack with future visitors to this issue.
Comment #8
Anonymous (not verified) commentedfound another issue that wanted this, so just to be clear - you can use whatever code you like in place of nodejs_auth_check_callback().
put this in settings.php:
then define 'my_mongo_nodejs_auth_callback' with whatever code you need.