Build

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

2 min read Joe 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

Top Trends to Engage Your App Users
InsightsSep 27, 20224 min read

Top Trends to Engage Your App Users

Take a look at the top trends that are the most effective in attracting customers and reducing churn, and how you can incorporate...

PubNub Staff

PubNub Staff

Comparing Game Engines: Unity vs Unreal vs the Rest
Real-Time Gaming BlogSep 21, 20225 min read

Comparing Game Engines: Unity vs Unreal vs the Rest

Comparing the major game engines: Unity vs Unreal Engine vs Corona SDK vs GameMaker Studio, including the benefits and cons of...

PubNub Staff

PubNub Staff

Python Socket Programming: Client, Server and Peer Libraries
BuildSep 21, 20226 min read

Python Socket Programming: Client, Server and Peer Libraries

Sockets (aka socket programming) enable programs to send and receive data, bi-directionally, at any given moment. This tutorial...

PubNub Staff

PubNub Staff