Goodbye Channel API, Hello PubNub

— with Google’s realtime messaging service on the way out, what now?

This week marks another shake up for app developers with the announcement by Google that they will “turndown” their popular Channel API product.

The Channel API did not scale well enough for the workloads it was intended for and so did not find wide adoption. Accordingly, support for the Channel API will be turned off on October 31, 2017.
You can use the Firebase Realtime Database to achieve superior realtime functionality in your application. Firebase is a more robust and customizable solution than the Channels API, and it allows communication with a broader set of clients. It currently supports Android, iOS, and apps, and web browser app

We all can empathize with this all too common reoccurring situation when a product or service is discontinued and that same provider’s suggested replacement is something quite different.

PubNub will never do that because this is all we do. We’re 100% in.

In the case of the Channel API, the single purpose API enabled a persistent connection between client applications and Google’s servers. For months now, Google has been making significant changes to their cloud services, turning down APIs in an effort to migrate customers over to Google Firebase.

The problem for Google customers using their Channel API is moving to Google Firebase is just not the right solution. Firebase is a synchronized database, which is not the same thing as the persistent connection maintained by the Channel API. If your particular use case fits database syncing then it’s a good option, but if not, PubNub’s stream-oriented API is far better choice.

Transitioning From Channel API to PubNub

Should you do decide to make the transition to Google Firebase, it will take some significant preparation, and making the switch is not an easy proposition. Take a look at Google’s own punch list of tasks required to transition from the Channel API to Google Firebase.

  • Set up your server to use the Firebase Realtime Database.
  • Create a unique Firebase database reference for each web client that connects to your service.
  • Send real-time updates to web clients by changing data on a particular database reference.
  • Securely access messages by creating unique tokens for each web client and using Firebase database security rules.
  • Receive messages from web clients over HTTP.
  • Delete data on a particular database reference after all messages have been sent to clients.
  • Securely connect to Firebase using a unique token from the server.
  • Dynamically update the interface when the database reference updates.
  • Send update messages to the server so they can be passed on to remote clients.

Whew! Now contrast that to the transition from Channel API to PubNub’s publish and subscribe API.

  • Sign up for PubNub.
  • Choose a SDK from over 70 Realtime SDKs
  • Write just a few lines of code and you’re off.

Getting started building realtime applications using PubNub is dead simple, and it just works.

So for those developers looking to transition from Google’s Channel API to PubNub, it not only makes sense, but feature-for-feature, it’s the correct alternative.

PubNub Overview

PubNub’s Data Stream Network is designed from the bottom up to be the “Best-In-Class” for Streaming Data globally. Its primary purpose is fast and efficient communication between devices with many other services like Presence (who’s online), Storage & Playback (retrieve missed messages, sync across devices, playback sessions), Access Manage for authorization (access controls), Mobile Push (push notifications when app is not running), Stream Controller (listen to 1000’s of channels on a single connection) and much more.

The key value proposition with PubNub’s Data Stream Network is that it works at massive scale. PubNub transmits over 1.8 trillion messages per month to over 330 million unique devices across 15 global points of presence.

PubNub’s broader support of over 70 SDK realtime SDKs means programmers can create realtime client applications across a wide variety of devices and platforms.

Stream Processing with PubNub BLOCKS

Where PubNub really stands out is with PubNub BLOCKS.

PubNub BLOCKS makes the network programmable, executing your application logic on data as it passes through the network, removing the need to deploy and scale app servers.

Let me repeat that concept… BLOCKS run like microservices, they execute your application logic within the data stream in realtime while eliminating the need to deploy and scale servers. Serverless.

For Developers, the easiest way to get your head around it is to think of PubNub BLOCKS as “Serverless” event handlers written in JavaScript and link to any channel you’re publishing. You can directly transform your message data in the BLOCK, or have the BLOCK call an external API with a JavaScript Promise and integrate the results into the realtime data stream.

PubNub’s BLOCKS innovation is truly transformative, making the Data Stream Network truly intelligent. Check out our BLOCKS Catalog of popular 3rd party APIs and unlock a wide array of possible use cases.

Final Thoughts

At the end of the day asking yourself this simple question: How valuable is your time? Do you really want to spend weeks transitioning and kluging your Channel API apps over to fit your provider’s synchronized database design pattern?

PubNub offers a dead simple way to implement a secure and reliable messaging solution that’s designed to meet the demands of modern applications and it “just works” across a huge number of devices and platforms.

Oh yeah, and if you get stuck we have an awesome set of humans in our support team who are happy to help you out just drop us a quick note at support@pubnub.com.

Dan Zeitman is a developer evangelist at PubNub.