Question

I have an application that I'm working on that needs to sync a timer between multiple cores (using cluster).

Is there an efficient reliable way that I can communicate between cores? I've looked at Redis, but that seems to be more geared towards client/server communication. I'd be grateful for any advice.

Thank you,

Was it helpful?

Solution

You need to take a look at hook.io:

hook.io creates a distributed node.js EventEmitter that works cross-process / cross-platform / cross-browser. Think of it like a real-time event bus that works anywhere JavaScript is supported.

OTHER TIPS

Look at message queue services such as ZeroMQ. They have advantage of supporting both local IPC and TCP transports, so you are ready for horizontal scalability beyond cores available on a single cloud node. zmq has a binding for node.

Take a look at https://github.com/substack/dnode You can use it to communicate between nodejs processes.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top