Client Push Services Open Up Real-Time to Everyone

Phil Leggetter, September 14th, 2010

Real-timeThe number of services offering real-time APIs is slowly but surely expanding and it looks like we’re going to have to add quite a few more. Since the start of the year a new type of service has started to appear–client push services, which help developers include real-time updates in their web apps.

Real-time client push APIs have actually been around for quite a while (around 10 years) as they are shipped with Comet servers but only recently have these been moved into the cloud and offered as a service. The service flavour of these APIs give the developer the ability to instantly push information from their web server, through their chosen push service and into a web browser viewing their website.

Scrabb.ly -- real-time multi-player word game

Real-time client push is intended to replace the previous pull, or polling, mechanism that has been used for many years to mimic live data on a website. Using push via a dedicated Comet server is generally more resource efficient than polling a web server, and by using a service the resource load and complexity involved in setting up and running a Comet service is completely taken away from the developer’s considerations. This means that the web server is under much less strain, the developer can concentrate on building a killer real-time application and the website user gets the benefit of a truly real-time experience.

These services have only recently started to pop up due to a number of technology advancements. To be able to use a real-time client push service the web browser needs to be able to maintain a persistent connection back to the web server so that the web server can push information to it as soon as it becomes available. This has been achievable for a number of years via what some developer have labelled as “hacks” but is now easier than it has ever been. Most of the new services use the JavaScript WebSocket object to achieve this and fallback to using Flash if WebSockets are not supported by the browser.

The web browser also needs to be able to maintain a cross domain connection from the JavaScript code running in the website to the service e.g. a connection from blog.programmableweb.com to www.example.com. In older browsers cross domain connections were not allowed but the introduction of client access policy files (crossdomain.xml and clientaccesspolicy.xml) and more recently the Access-Control-Allow-Origin HTTP header have made cross domain calls from JavaScript possible (You can find more information and a demo of this in action here).

All of the real-time client push services have adopted a data publisher subscriber model with the web server code generally acting as the data publisher and the JavaScript code running in the web browser acting as the data subscriber. Subscriptions are made to a channel (or topic), that either exists or will be created, within the service and are identified by a name e.g. “my_channel” or “/PW/CHAT”. The publishers then simply publish data to that channel or topic using a service API and the information is instantly received by all subscribers, again via an API.

The real-time client push services that we know of at the moment are:

And some examples of their use include:

You can also check out the demos on each of the services websites.

The real-time 'meh' button

Real-time is already a big topic and users are starting to demand data and results as fast as possible. There is also the expectation that they should be informed as soon as new data is available or the existing data changes. Google are already pressing ahead with new real-time advancements such as Google Real-Time search (which actually uses polling) and Google Instant but the good news is that with the availability of real-time client push services any developer can now add real-time to their website.

Let us know if you are interested in finding out more about these real-time client push APIs and services and we’ll cover each one in more detail.

Photo via Blake Patterson

Both comments and pings are currently closed.

16 Responses to “Client Push Services Open Up Real-Time to Everyone”

September 15th, 2010
at 9:46 pm
Comment by: Todd

Great article! Please note that Pubnub.com (creator of the “meh button”) is also a real-time client push service.

September 16th, 2010
at 4:03 am
Comment by: Phil Leggetter

@Todd Thanks. There was a blog link to PubNub but I missed the direct service link. Updated the post to also list PubNub as a real-time client push service.

September 19th, 2010
at 12:46 pm
Comment by: 11 New APIs: Travel, FCC and Real-time Push

[...] including a gps data sharing service, fitness tracking service, social television service and two real-time push services. Below is more details on each of these new [...]

September 21st, 2010
at 2:26 pm
Comment by: infomisa.net» Blog Archive » 11 New APIs: Travel, FCC and Real-time Push

[...] including a gps data sharing service, fitness tracking service, social television service and two real-time push services. Below is more details on each of these new [...]

December 20th, 2010
at 12:01 am
Comment by: Superfeedr Introduces Real-time Client Push Capabilities

[...] and WebSocket connections for real-time streams. Superfeedr aren’t alone in offering real-time client push but they may well be the first to offer it as an extension of an existing [...]

December 21st, 2010
at 3:17 am
Comment by: Superfeedr Introduces Real-time Client Push Capabilities | Another Newyork Times

[...] and WebSocket connections for real-time streams. Superfeedr aren’t alone in offering real-time client push but they may well be the first to offer it as an extension of an existing [...]

December 31st, 2010
at 12:01 am
Comment by: Yahoo’s Open Sourced S4 Could be a Real-time Cloud Platform

[...] mashups or hosted services which could integrate with other components such as real-time APIs, real-time client push services and DaaS services. Tags: Yahoo, realtime Subscribe:RSSTwitterFacebook « Previous [...]

December 31st, 2010
at 3:20 am
Comment by: Yahoo’s Open Sourced S4 Could be a Real-time Cloud Platform | Another Newyork Times

[...] mashups or hosted services which could integrate with other components such as real-time APIs, real-time client push services and DaaS [...]

January 3rd, 2011
at 3:52 am
Comment by: Yahoo’s Open Sourced S4 Could be a Real-time Cloud Platform | Phil Leggetter - Real-Time Web Software and Technology Evangelist

[...] mashups or hosted services which could integrate with other components such as real-time APIs, real-time client push services and DaaS [...]

January 4th, 2011
at 9:47 pm
Comment by: Yahoo’s Open Sourced S4 Could be a Real-time Cloud Platform « Geeks Share Space

[...] mashups or hosted services which could integrate with other components such as real-time APIs, real-time client push services and DaaS [...]

January 5th, 2011
at 4:01 am
Comment by: What are alternatives to pusherapp.com? - Quora

[...] a blog post I wrote a while back about real-time client push services here:http://blog.programmableweb.com/…Insert a dynamic date hereCannot add comment at this [...]

January 5th, 2011
at 4:06 am
Comment by: Why would you choose to do classical polling over long polling? - Quora

[...] suggests if you are not running a Comet server or using a 3rd party real-time push service (see: http://blog.programmableweb.com/...) then maybe classic polling would be a better option. But if real-time push is an important part of [...]

January 10th, 2011
at 2:08 am
Comment by: Comment on The Rise of Multi-user, Multi-device Tablet Applications by Kate Ho | Phil Leggetter - Real-Time Web Software and Technology Evangelist

[...] collaboration applications and games which used the Internet as the network for the messages. In this post I wrote for Programmable Web on real-time client push services the first screenshot is of a [...]

February 25th, 2011
at 12:01 am
Comment by: The Evolution and Future of Real-time Browser Push

[...] the past months we have covered real-time client push services and seen the introduction of real-time client push technology and APIs to a number of services such [...]

February 25th, 2011
at 3:44 pm
Comment by: The Evolution and Future of Real-time Browser Push | Another Newyork Times

[...] the past months we have covered real-time client push services and seen the introduction of real-time client push technology and APIs to a number of services such [...]

March 17th, 2011
at 2:37 am
Comment by: Real-Time Web or Right-Time Web?

[...] as demonstrated by HTTP Streaming, WebSockets, PubSubHubbub, Webhooks and Comet and as used by real-time client push services and services such as Superfeedr and DataSift. Any event or notification based system needs to use [...]

Follow the PW team on Twitter

ProgrammableWeb
APIs, mashups and code. Because the world's your programmable oyster.

John Musser
Founder, ProgrammableWeb

Adam DuVander
Executive Editor, ProgrammableWeb. Author, Map Scripting 101. Lover, APIs.