Redis pub/ sub vs node event emitter
I'm not sure I understand the difference really between using Redis pub/ sub and using node/ express' event emitter. Does the pub/sub interact with my database in any way? In what cases would I use one over the other?
Redis allows you to build fast and powerful inter-process communication. Redis pub/sub uses your Redis process to deliver your messages, but it newer affects the data stored in Redis DB.
Event emitter works only within the single node process. So, even if you have a single node cluster, events, emitted by one worker, wont be visible to another.
Hence, event emitter is the perfect choice for within-the-process communication. But if you need inter-process communication, you should use Redis.