Hello, I'm newest in nodejs.
My application based on expressjs + cluster.
And now for me is not clear how to share data between processes?
Code example :
function Acl(storage) { //storage - mongodb
return {
isAllow: function(role, resource, cb) {
if (!cache) {
loadCache(function() {
//check permissions
});
}
},
allow: function(role, resource, permissions, cb) {
storage.save({
role: role,
resource: resource,
permissions: permissions
}, function() {
//put to cache
//inform of all processes that acl was changed
cb(null, true);
});
}
}
}
Thanks for help!
--
--
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
---
You received this message because you are subscribed to the Google Groups
"nodejs" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.