Skip Navigation
Show nav
Heroku Dev Center
  • Get Started
  • Documentation
  • Changelog
  • Search
  • Get Started
    • Node.js
    • Ruby on Rails
    • Ruby
    • Python
    • Java
    • PHP
    • Go
    • Scala
    • Clojure
  • Documentation
  • Changelog
  • More
    Additional Resources
    • Home
    • Elements
    • Products
    • Pricing
    • Careers
    • Help
    • Status
    • Events
    • Podcasts
    • Compliance Center
    Heroku Blog

    Heroku Blog

    Find out what's new with Heroku on our blog.

    Visit Blog
  • Log inorSign up
View categories

Categories

  • Heroku Architecture
    • Dynos (app containers)
    • Stacks (operating system images)
    • Networking & DNS
    • Platform Policies
    • Platform Principles
  • Command Line
  • Deployment
    • Deploying with Git
    • Deploying with Docker
    • Deployment Integrations
  • Continuous Delivery
    • Continuous Integration
  • Language Support
    • Node.js
    • Ruby
      • Working with Bundler
      • Rails Support
    • Python
      • Background Jobs in Python
      • Working with Django
    • Java
      • Working with Maven
      • Java Database Operations
      • Java Advanced Topics
      • Working with Spring Boot
    • PHP
    • Go
      • Go Dependency Management
    • Scala
    • Clojure
  • Databases & Data Management
    • Heroku Postgres
      • Postgres Basics
      • Postgres Getting Started
      • Postgres Performance
      • Postgres Data Transfer & Preservation
      • Postgres Availability
      • Postgres Special Topics
    • Heroku Data For Redis
    • Apache Kafka on Heroku
    • Other Data Stores
  • Monitoring & Metrics
    • Logging
  • App Performance
  • Add-ons
    • All Add-ons
  • Collaboration
  • Security
    • App Security
    • Identities & Authentication
    • Compliance
  • Heroku Enterprise
    • Private Spaces
      • Infrastructure Networking
    • Enterprise Accounts
    • Enterprise Teams
    • Heroku Connect (Salesforce sync)
      • Heroku Connect Administration
      • Heroku Connect Reference
      • Heroku Connect Troubleshooting
    • Single Sign-on (SSO)
  • Patterns & Best Practices
  • Extending Heroku
    • Platform API
    • App Webhooks
    • Heroku Labs
    • Building Add-ons
      • Add-on Development Tasks
      • Add-on APIs
      • Add-on Guidelines & Requirements
    • Building CLI Plugins
    • Developing Buildpacks
    • Dev Center
  • Accounts & Billing
  • Troubleshooting & Support
  • Integrating with Salesforce
  • Add-ons
  • All Add-ons
  • deepstreamHub
deepstreamHub

This add-on is operated by deepstreamHub GmbH

a lightning fast realtime data-store

deepstreamHub

Last updated August 21, 2017

The deepstreamHub add-on is currently in beta.

Table of Contents

  • Provisioning the add-on
  • Local setup
  • Using with Node.js
  • Using with Java
  • Using with PHP
  • Dashboard
  • Removing the add-on
  • Support

deepstreamHub provides a lightning-fast, real-time data store that connects browsers, smartphones, app backends, and the Internet of Things. It comes complete with real-time search, publish-subscribe, and request-response functionality.

deepstreamHub is accessible via an API with client libraries for Java, Node.js, Javascript, and Swift.

Provisioning the add-on

deepstreamHub can be attached to a Heroku application via the CLI:

A list of all plans available can be found here.

$ heroku addons:create deepstreamhub
-----> Adding deepstreamhub to sharp-mountain-4005... done, v18 (free)

After you provision deepstreamHub, the DEEPSTREAMHUB_APPURL config var is available in your app’s configuration. You use this value to connect to the deepstreamHub API. You can inspect this value via the heroku config:get command:

$ heroku config:get DEEPSTREAMHUB_APPURL
wss://154.deepstreamhub.com?apiKey=d72041da-ec81-430d-ad2a-2ff1607776ec

After you install deepstreamHub, your application should be configured to fully integrate with the add-on.

Local setup

Environment setup

After you provision the add-on, it’s necessary to locally replicate its config vars so your development environment can operate against the service.

Use the Heroku Local command-line tool to configure, run and manage process types specified in your app’s Procfile. Heroku Local reads configuration variables from a .env file. To view all of your app’s config vars, type heroku config. Use the following command for each value that you want to add to your .env file:

$ heroku config:get DEEPSTREAMHUB_APPURL -s  >> .env

Credentials and other sensitive configuration values should not be committed to source-control. In Git exclude the .env file with: echo .env >> .gitignore.

For more information, see the Heroku Local article.

Using with Node.js

To use deepstreamHub with Node.js, you install the deepstream.io-client-js SDK and connect to your app’s DEEPSTREAMHUB_APPURL.

Installation

Installing with npm

$ npm install deepstream.io-client-js --save

Installing with Yarn

$ yarn add deepstream.io-client-js

Importing the SDK

To import the SDK, add the following line to your app:

const deepstream = require( 'deepstream.io-client-js' );

Connecting to deepstreamHub

Connect to deepstreamHub at the URL specified in your DEEPSTREAMHUB_APPURL config var:

const ds = deepstream( process.env.DEEPSTREAMHUB_APPURL );

Then, log in (in this example, no authentication has been configured, so no credentials are required in this call):

ds.login();

See the deepstreamHub documentation for an in-depth tutorial on using the Node.js SDK.

Using with Java

To use deepstreamHub with Java, add the following line to your build.gradle file:

compile 'io.deepstream:deepstream.io-client-java:2.0.4'

In your application code, instantiate a client like so:

String deepstreamhub = System.getenv("DEEPSTREAMHUB_APPURL")
DeepstreamClient client = new DeepstreamClient(deepstreamhub);

Then, log in (in this example, no authentication has been configured, so no credentials are required in this call)

client.login();

See the deepstreamHub documentation for an in-depth tutorial on using deepstreamHub with Java.

Using with PHP

To use deepstreamHub with PHP, install the SDK with the following Composer command:

$ composer require deepstreamhub/deepstream.io-client-php`

The following example demonstrates emitting an event from PHP:

<?php

use Deepstreamhub\DeepstreamClient;

// Instantiates a client and emits an event
$client = new DeepstreamClient( $_ENV["DEEPSTREAMHUB_HTTP_APPURL"], array());

$client->emitEvent( 'news/sports', 'something about football is happening');

See the deepstreamHub documentation for an in-depth tutorial on using deepstreamHub with PHP.

Dashboard

The deepstreamHub dashboard allows you to view analytics, add or remove users, change authentication types, and much more.

You can access the dashboard via the CLI:

$ heroku addons:open deepstreamhub
Opening deepstreamhub for sharp-mountain-4005

or by visiting the Heroku Dashboard and selecting the application in question. Select deepstreamHub from the Add-ons menu.

Removing the add-on

You can remove deepstreamHub via the CLI:

This will destroy all associated data and cannot be undone!

$ heroku addons:destroy deepstreamhub
-----> Removing deepstreamhub from sharp-mountain-4005... done, v20 (free)

Support

All deepstreamHub support and runtime issues should be submitted via one of the Heroku Support channels. Any non-support related issues or product feedback is welcome at support@deepstreamhub.com, or via the support widget in the dashboard.

Keep reading

  • All Add-ons

Feedback

Log in to submit feedback.

Ziggeo DockHero

Information & Support

  • Getting Started
  • Documentation
  • Changelog
  • Compliance Center
  • Training & Education
  • Blog
  • Podcasts
  • Support Channels
  • Status

Language Reference

  • Node.js
  • Ruby
  • Java
  • PHP
  • Python
  • Go
  • Scala
  • Clojure

Other Resources

  • Careers
  • Elements
  • Products
  • Pricing

Subscribe to our monthly newsletter

Your email address:

  • RSS
    • Dev Center Articles
    • Dev Center Changelog
    • Heroku Blog
    • Heroku News Blog
    • Heroku Engineering Blog
  • Heroku Podcasts
  • Twitter
    • Dev Center Articles
    • Dev Center Changelog
    • Heroku
    • Heroku Status
  • Facebook
  • Instagram
  • Github
  • LinkedIn
  • YouTube
Heroku is acompany

 © Salesforce.com

  • heroku.com
  • Terms of Service
  • Privacy
  • Cookies
  • Cookie Preferences