3

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,

daotoad
  • 26,689
  • 7
  • 59
  • 100
Eric Clifford
  • 223
  • 3
  • 8

3 Answers3

3

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.

kilianc
  • 7,397
  • 3
  • 26
  • 37
2

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.

nponeccop
  • 13,527
  • 1
  • 44
  • 106
2

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

masylum
  • 22,091
  • 3
  • 20
  • 20