On Friday, June 15, 2012 4:59:39 PM UTC+2, Dean Mao wrote: > > sounds similar to resque?
Something similar, however the idea is to only use core node.js functions, no dependencies at all after node.js. It is in the current form like a P2P network, any process can whenever it want register and de-register a method and call someone else. I don“t know what you guys find interesting, but in my opinion does the node.js community lack of a simple lightweight IPC library. The best I have found is the dnode (https://github.com/substack/dnode), but it looks like it is not possibly to register/de-register on the fly. The library also focus on remote calls over www, which make the library probably use TCP/IP everywhere, which is probably slower than the inbuilt IPC communication in node.js. I have some ideas to make it possibly to send function instances over the which automatic get serialized/unserialized when transmitted through the IPC calls. So anyone can do: ipc.register('encrypt', function(data, next) { next(new Error("Encryption failed")); //it is not possible in the current form, because process.send does not allow function instances as new Error creates. } However, it could pretty simple to allowing something like the following: //on both request/response side: ipc.registerObject(new Error(), { serialize: function(obj) { //make obj (Error type) to a plain object containing only primitive types return { }; }, deserialize: function(obj) { //construct Error from obj return new Error(); } }); ipc.register('encrypt', function(data, next) { next(new Error("Encryption failed")); //it should now work, serialization will happen automatically. } It should of course in that case be possibly to invoke some parent serialization functions, so inheritance is possibly. But this is a general problem for all software, so there should be pretty straightforward to find a good solution for this. Common, what does you folks believe? Good or not? Something to built on? Cheers! -- 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
