sockets - Best way to communicate between processes with Node.js -
i'm developing lightweight framework work coordinator in robotics competition compete.
my idea, have agnostic programs whole, inputs might triggers outputs. then, connect outputs inputs, , can have different behaviours same modules, without hard work.
i'm planning on doing node.js , webkit, allow nice ui modifying process. however, each "module" might not code wrapped in javascript class-like function, might real thread, running maybe c++ native code (without node.js), or python program.
what i'm facing now, fast way, , generic, exchange data among processes. have read it, haven't got conclusions...
here 3 methods found out:
- local socket: uses localhost dispatch broadcast port
- unix socket: maybe more efficient above (but using filesystem?)
- stdin/out communication: when process launched node.js, binding stdin , stdout can used communicate between program.
so, have 3 ways of doing it, should use mostly? need things communicate fast (data might go through 5 different processes, , need not exceed 2ms)
Comments
Post a Comment