JavaScript Push API 2.0 Upgraded

June 17th, 2010 The new JavaScript Push API 2.0 is faster, simplified and totally answers top requested feature updates including the most requested unsubscribe function.

Download JavaScript Push API
NOTICE: this blog is outdated. There is a newer version of the PubNub Real-time Cloud API. Note however that the API calls mentioned here STILL WORK.

Read: JavaScript Push API For the latest information.

New UnSubscribe() Function Push API

The Top Requested Feature UnSubscribe() is now available. We implemented this function in the new JavaScript Push API 2.0 version. Many requests asking for a way to free subscription resources were sent. Now you can cleanup subscriptions by calling:

// PUBNUB.unsubscribe(args)
PUBNUB.unsubscribe({ channel : 'name_of_channel" });

Read Updated API 2.0 Doc: JavaScript Push API 2.0 Updates

Simplified JavaScript Subscribe API

Other popular requests were for API simplifications. You are no longer required to iterate over messages from the PUBNUB.subscribe() function. See the following code sample.

// PUBNUB.subscribe( args, callback )
PUBNUB.subscribe({
    channel : 'my_channel'
}, function(message) {
    // Show Message
    console.log(message);
} );

The simplification is helpful by reducing client code size. Easier adoption of the API and fewer docs to consider. We've also simplified the History API: History API Tutorial - JavaScript Push API 2.0

Performance Increase of JavaScript Push API 2.0

The 2.0 API provides a faster connection interface to our server clusters in different locales. This means faster communication internationally.

Another boost on our servers updated through memcaching data points allows faster lookup and delivery for all PUBNUB.publish() calls.

Scalability and Redundancy of JavaScript Push API 2.0

The PubNub Server Cluster is still as scalable and redundant as ever before. Pubnub will scale to facebook load and beyond. Over 100 million standing connections without delays. Today our load is more than five hundred thousand standing connections.

PHP Push API 2.0

We've also updated our PHP Push API Client Library. You can find this on GitHub: PHP Push Client Library API 2.0 Updates

jQuery Push API 2.0 Plugin

We've released the jQuery Plugin with this update! jQuery Push API

There are more behind the scenes updates that you get for free! Play around with the on-page test buttons: JavaScript Push API 2.0 Tutorial Updates