문제

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,

도움이 되었습니까?

해결책

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.

다른 팁

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.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top