Free up to 1MM monthly messages. No credit card required.
While this post still contains useful knowledge, we have a newer article on this topic available on our Glossary: HTTP Long Polling.
Web applications were originally developed around a client/server model, where the Web client is always the initiator of transactions, requesting data from the server. Thus, there was no mechanism for the server to independently send, or push, data to the client without the client first making a request.
To overcome this deficiency, Web app developers can implement a technique called HTTP long polling, where the client polls the server requesting new information. The server holds the request open until new data is available. Once available, the server responds and sends the new information. When the client receives the new information, it immediately sends another request, and the operation is repeated. This effectively emulates a server push feature. A simple diagram below:
There are a couple of things to consider when using HTTP long polling to build real-time interactivity in your application, both in terms of developing and operations/scaling.
When building a real-time application with HTTP long polling for server push, you’ll have to develop your own communication management system. This means that you’ll be responsible for updating, maintaining, and scaling your backend infrastructure.
With these considerations in mind, that's where a real-time communication platform like PubNub comes in. PubNub takes care of the backend infrastructure for you, so you don’t have to worry about maintaining and orchestrating your real-time network.
When looking at HTTP long polling with the goal of streaming data, PubNub is a low-latency and low-overhead real-time Web app communication environment, and features the ability to send messages to a single client, client groups and all clients. Upgrading to PubNub is both rapid and easy since PubNub is based on a publish/subscribe model.
Instead of relying solely on HTTP long polling for real-time messaging, a protocol agnostic approach is beneficial. PubNub automatically chooses the best protocols and frameworks depending on environment, latency, etc. Any server or client code wanting to communicate makes a single API call to publish or subscribe to data channels.
The code is identical between clients and servers, making implementation much simpler than using HTTP long polling. In terms of connection management, the network handles network redundancy, routing topology, loading balancing, failover, and channel access. Additionally, PubNub offers core building blocks for building real-time into your application.
A Notice of Privacy Practices (NPP) is one of the requirements of HIPAA and helps patients understand their personal data rights.
HIPAA violations can be financially expensive and devastating to a brand. Examine some examples of HIPAA violations, and learn...
HIPAA covered entities must follow the five technical safeguards to achieve HIPAA compliance and prevent data corruption.