Real-time Chat Blog

Migrating Your Chat Widget from GoInstant to PubNub

2 min read PubNub Staff on Aug 3, 2014
Try PubNub Today

Free up to 1MM monthly messages. No credit card required.

Subscribe to our newsletter

By submitting this form, you are agreeing to our Terms and Conditions and Privacy Policy.

Good News! We've launched an all new Chat Resource Center. We recommend checking out our new Chat Resource Center, which includes overviews, tutorials, and design patterns for building and deploying m...

Waving Hand

Good News! We’ve launched an all new Chat Resource Center.

We recommend checking out our new Chat Resource Center, which includes overviews, tutorials, and design patterns for building and deploying mobile and web chat.

Take me to the Chat Resource Center →

On August 1st, GoInstant announced the shutdown of their service as of August 31, 2014. PubNub is here to help ease your transition by providing you tools to migrate from GoInstant to the PubNub Data Stream Network. With GoInstant closing their operations in less than a month, we, here at PubNub decided to migrate some of their widgets to work with PubNub.

Take a look at our GoInstant-to-PubNub conceptual translation guide for migrating developers here, or an overview of our migration tools here.

Migrating Your Chat Widget

In this tutorial, we migrated the GoInstant chat widget, providing a seamless transition for users using GoInstant to power their real-time chat. PubNub currently provides 50+ SDKs, so you can choose one that you are most comfortable with. Additionally, our APIs are simple to use and you can use it for live dashboards and streams, presence, collaboration, second-screen synchronization and machine-to-machine signaling.

Using PubNub’s JavaScript SDK, I just needed the publish and subscribe APIs for the chat application transistion.

With this chat migration, PubNub enables you to continue to provide real-time chat. In this blog, I’ll walk you through the steps of the migrating from GoInstant to PubNub.

Step 1:

You’ll first need to sign up for a PubNub account. Once you sign up, you can get your unique PubNub keys in the PubNub Developer Portal.

The aim is to build a simple chat application using PubNub. At PubNub we use publish and subscribe keys to initialize an instance of PubNub.

Initialization in GoInstant, on the other hand, requires you to connect to a url using to access and store data for your app.

Step 2:

Once you initialize, a user will be able to choose a username and a chat room (channel). The username for a user can be set using uuid during initialization.

Step 3:

In this example, I won’t cover the authentication required for using the GoInstant chat application. This can be easily added to your simple chat using PubNub Access Manager (PAM) which provides fine grain Publish and Subscribe permissions down to person, device or channel. Sending and receiving messages uses ‘pubnub.publish() and pubnub.subscribe()’ as shown below:

Overall, you need just ten lines of code to build a chat application with PubNub. Different services like login, logout and authentication can then be added to it based on your requirements. We hope that this tutorial made your transition from GoInstant to PubNub that much easier!

 

More from PubNub

Top Trends to Engage Your App Users
InsightsSep 27, 20224 min read

Top Trends to Engage Your App Users

Take a look at the top trends that are the most effective in attracting customers and reducing churn, and how you can incorporate...

PubNub Staff

PubNub Staff

Comparing Game Engines: Unity vs Unreal vs the Rest
Real-Time Gaming BlogSep 21, 20225 min read

Comparing Game Engines: Unity vs Unreal vs the Rest

Comparing the major game engines: Unity vs Unreal Engine vs Corona SDK vs GameMaker Studio, including the benefits and cons of...

PubNub Staff

PubNub Staff

Python Socket Programming: Client, Server and Peer Libraries
BuildSep 21, 20226 min read

Python Socket Programming: Client, Server and Peer Libraries

Sockets (aka socket programming) enable programs to send and receive data, bi-directionally, at any given moment. This tutorial...

PubNub Staff

PubNub Staff