Broadcasting a message

The Ping-Pong app that we built shows all the events, regardless of their source. If someone else pings, it shows in our list. If we ping, it shows on our list. We do not want to do this. We only want the application to show if someone else pings. Showing our own pings isn't necessarily a bad feature to have. What makes it bad is that we send the ping to the server and the server sends it back to us. We can (and will) make it more efficient by only sending the ping to everyone else. How?

Broadcast! This seems to be a misnomer. If you are broadcasting something, you think it goes out to everyone. This is very close to what Socket.IO does. Broadcast will send it out to everyone but you. If there are four clients connected, ...

Get Building Scalable Apps with Redis and Node.js now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.