Build

Live and In Color: Real-time Pub/Sub Messaging

2 min readJoe Hanson on Dec 6, 2018
Try PubNub Today

Free up to 1MM monthly messages. No credit card required.

Subscribe to our newsletter

By submitting this form, you are agreeing to our Terms and Conditions and Privacy Policy.

Our newest demo showcases PubNub in its simplest form, blazing-fast pub/sub messaging to any number of connected users.

At PubNub, we’re always thinking of the simplest way to describe what PubNub does. We often turn to chat – the individual chat message being a great representation of a real-time message being sent through PubNub.

However, a PubNub message is so much more than just text. It can trigger an action, like turning on a lightbulb or firing off a transactional email. It can be a piece of data to update a live dashboard. Or it can even move a player around in a multiplayer game.

So we built a new demo app called PubNub Live and In Color, a real-time multi-user color changer. The concept is simple – users can connect to the app and change the color of every other connected users’ screen.

Try it here by opening it up in a couple browsers, or on your phone and browser  – each one is a unique connected user in this case.

You can also check out the full GitHub repo here.

However, that’s where the simplicity ends, and the complexity of what’s happening behind the scenes begins. The first is reliability at scale. Whether there are three or 3,000 users connected, you’re going to get the same real-time, low-latency changing of colors for every connected user. Secondly, global coverage. We tested this app with someone in the UK and someone in Tokyo, and still got that same seamless color changing. This is all made possible by the PubNub Data Stream Network, allow the users to connect and maintain an open connection, and deliver messages in real time. We’ve built out the infrastructure so you don’t have to.

So what’s next? This is Real-time Messaging in its simplest form. You can check out our common use cases for a wide variety of industries and verticals, or head over to our blog for some in-depth tutorials to spur your imagination. And we’re always here to talk about your next project too.

More from PubNub

Can Empathy Exist in the Metaverse
News May 16, 20221 min read

Can Empathy Exist in the Metaverse

A roundtable discussion led by PubNub’s COO, Casey Clegg, exploring the topics of what it means to be human in a virtual world.

PubNub Staff

PubNub Staff

How to Advance Telehealth and Virtual Care Technologies
News May 2, 20221 min read

How to Advance Telehealth and Virtual Care Technologies

Dr. Joe Kvedar, Chair of the Board for the American Telemedicine Association, joins our COO, Casey Clegg, to discuss why...

PubNub Staff

PubNub Staff

Another Step Towards Data Security: ISO-27001 Implementation
BuildMay 2, 20221 min read

Another Step Towards Data Security: ISO-27001 Implementation

Today, we are glad to announce that we are currently in the process of implementing ISO-27001 security standards.

PubNub Staff

PubNub Staff