Closed needforspeed closed 8 years ago
The Redis adapter is used to emit/broadcast messages to all workers. If not used, the messages would be sent only to the clients connected to that specific worker.
Imagine the following scenario:
Client A ----> Worker 1 Client B ----> Worker 2 Client C ----> Worker 1
The Redis adapter allows you to send a message to all clients by using Redis's Pub/Sub mechanism. Otherwise, if you started your broadcast from the Worker 2, only Client B would receive the message.
Forgot about this. No, you can't. Different processes don't share address space so your map would be local to the master and invisible to the workers.
Can I just use a map in master of the cluster for the key value pair instead? If so, can you please share some code for such? Especially on the adapter part, I didn't find much document on the adapter.
Thank you in advance!