IN THIS ARTICLE

    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 realtime 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 realtime 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!

     

    Try PubNub today!

    Build realtime applications that perform reliably and securely, at global scale.
    Try Our APIs
    Try PubNub today!
    More From PubNub