Your users want live, real-time data pushed to their apps or feeds instantaneously. With PubNub you can achieve that in a few lines of code, regardless of how many users you have or how much data you are publishing.
Let’s say your application is generating a lot of data and you want to distribute that data to your growing user base. For example:
A multiplayer game, sending game state and character movements to all players.
Weather reports for a rapidly changing storm
The latest stock quotes
Aggregating, analyzing, and distributing sensor data
Social media updates for real-time sentiment analysis.
The latest traffic reports nationwide
Whatever your use case, there is a common requirement to stream and publish data in real-time and have that data received by end users as quickly as possible.
If you want to build that functionality for yourself, you would probably adopt a publish-subscribe architecture, since you publish data to multiple subscribers. You would then need to start thinking about how you would scale that solution… What happens if your user base is geographically diverse? What uptime does your cloud provider offer? How are you going to consume this data on the client across mobile, web, and embedded systems?
Luckily, you don’t have to worry about how you will distribute and manage your real-time data streams because PubNub does that all for you. PubNub can consume any amount of real-time data and distribute it to your entire user base within 100-150ms with 99.999% uptime.
If you are new to PubNub, our tour will help you to understand the basics, including how to publish and subscribe to data.
We also have a simplified real-time streaming demo that shows PubNub publishing Twitter updates, Wikipedia edits as well as some simulated game and sensor streams.
These are just examples and the published rate of the demos is artificially capped.
Consider the Twitter updates described earlier, the demo makes use of the Twitter Real-time tweet streamer to receive new tweets which are then published to PubNub and PubNub takes care of delivering the data to all interested endpoints, regardless of scale.
If you are new to PubNub or need a refresher on how to publish data, please check out our Tour.
You would substitute Twitter with your own source of data.
PubNub does not impose hard limits on your publish rate but please refer to the publish rate limit recommendations in our documentation. In summary, if you have a very high throughput application (publishing more than 10-15 messages/sec per channel) you should speak with one of our experts who can help with your application architecture.
To understand how to receive data, let's look at another stream example, the Wikipedia stream, which is driven by Wikipedia’s event stream.
Any application who wants to receive the data can
subscribe to it. The code below is all you need to receive data from the demo Wikipedia stream.
For your own app you would need to change the
channel name to match how you are publishing your data.
PubNub does not impose hard limits on your subscribe rate but you may be limited by other hardware or network factors. Please refer to the rate limit recommendations in our documentation and speak with one of our experts who can help architect very high throughput applications.
Sign up for a PubNub account and create your own keys. Try publishing your own data in PubNub to test performance and capability. PubNub offers HIPAA, GDPR, and SOC2 compliance along with a robust security model so we can cater to all data. Remember that demo keys are rate-limited to 5 requests per second so please sign-up and generate a real key prior to testing performance.
Want to discuss things further? Talk to a technical sales representative.