If you want to add real-time functionality to your web or mobile app, you may have considered using the WebSockets protocol to push data between the server and the client’. In our “What are WebSockets?” blog post published last week, we looked at what WebSockets are and why you might use them.
In the video below, Stephen and Ian briefly discuss how PubNub can be used to enhance your WebSockets application. Or keep reading the blog post below for more detail.
How PubNub Takes WebSockets to the Next Level from PubNub on Vimeo.
The WebSockets protocol is exactly what its name implies – a protocol. It establishes a grammar between two systems utilizing the well-established and loved TCP layer. When implemented, it communicates over a persistent connection between server and client. And then, you’re on your own. So, what’s next? What do you actually need to deliver real-time in your apps?
Establishing a connection to each device is only the beginning. Now, you need to do something with that persistent connection. This is where PubNub comes in. PubNub provides a set of real-time “building blocks”; services that take advantage of an open socket connection.
These are a few examples of a rich set of building block services that take advantage of persistent socket connections made possible by WebSockets and other real-time protocols. And while there are several libraries and frameworks that also provide various real-time features using WebSockets, like Socket.IO, SignalR and SocksJS, none of these frameworks scale out-of-the-box. And deployment and scaling is where the pain really hits.
As complex as it is, getting real-time functionality developed is only 25% of the challenge. When you start dealing with high traffic, operational and scaling challenges kick in. Deploying and scaling a reliable real-time system involves a complex set of operations and orchestration hurdles. Over time, over 75% of your time and budget will end up focused on scaling and maintaining a self-hosted real-time system.
Supporting a successful app in a production environment requires many redundant servers, new kinds of monitoring tools, sophisticated deployment and failover processes, engineering maintenance and upkeep. Maintaining a real-time data stream network with redundancy, geographic server distribution, geo-routing, latency monitoring, and high reliability is hefty financial burden. App companies that support their own real-time systems often find themselves spending over half their engineering effort building and maintaining the real-time infrastructure instead of focusing on improving their app’s value proposition. A real-time app needs a globally distributed and redundant data stream network.
The PubNub Data Stream Network takes the rich real-time functionality “building blocks” described above and delivers them on a reliable service running in data centers around the world delivering performance, reliability, and redundancy. Some of the key reasons your app needs a data stream network are:
As we said earlier, WebSockets is a protocol, nothing more, nothing less. The PubNub Data Stream Network delivers many real-time services on top of real-time protocols, while also solving the costly and complex deployment challenges for real-time. Being able to effectively deploy and scale out your real-time app ends up being at least 75% of the cost and complexity of a real-time system.
When you plug into the PubNub Data Stream Network, we deliver rich real-time functionality like unicast and broadcast messaging, presence, security, analytics, storage, and lots more. Even more importantly, we handle the network redundancy, routing topology, tunneling, replication and data security. That way, you can focus on the important part: developing your application by focusing on the features that deliver business value.
Get Started
Sign up for free and supercharge WebSockets with PubNub
There are common underlying technologies for a dating app, and in this post, we’ll talk about the major technologies and designs...
Michael Carroll
How to use geohashing, JavaScript, Google Maps API, and BART API to build a real-time public transit schedule app.
Michael Carroll
How to track and stream real-time vehicle location on a live-updating map using EON, JavaScript, and the Mapbox API.
Michael Carroll