IN THIS ARTICLE
Pub/Sub Messaging is at the core of realtime functionality in web, mobile, and Internet of Things applications. To name a few general uses, it enables you to stream data, communicate bi-directionally, broadcast, and signal devices. Really, the use cases are endless.
But in the simplest terms, it revolves around publish and subscribe, where messages are sent from a a publisher to any number of subscribers.
And in this tutorial, we’ll do just that. In 6 steps, we’ll show you how to implement pub/sub messaging at its core. In our tutorial we’ll:
- Install the PubNub API
- Input publish/subscribe keys
- Subscribe to a channel
- Publish to that channel
- Send data on a channel
- Stream data on a channel
And that’s it!
In the video below, Stephen and Tomomi we’ll go through the process step-by-step. If you want to follow along, check out our Pub/Sub Quick Start Tutorial for the code from the video, and use your favorite text editor and the JavaScript console.
Building a Realtime App with Pub/Sub Messaging from PubNub on Vimeo.
We have a number of other quick start tutorials around our core features including:
- Presence: Track the online/offline status of users and devices in your app
- Storage & Playback: Store realtime message streams for future retrieval and playback
- Access Manager:Control access permissions to streams of data by person, device, or channel
Check them out and let us know what you think!