This add-on is operated by Bluzelle
Decentralized data storage to achieve unprecedented security and scale.
Last updated 04 December 2018
The Bluzelle DB add-on is currently in beta.
Table of Contents
Bluzelle DB is an add-on for providing data storage in a secure, scalable manner.
- Data is broken into shards and stored across a swarm of nodes
- Easily scalable if more storage is required
- Comes with BluzelleStudio which developers can use to view/manage their data
- Full open-source code from Bluzelle’s Heroku Add-On Git Repository
- Sample code implementation of a Heroku Application using the Bluzelle DB add-on
Bluzelle DB is accessible via an API and has supported client libraries for Python and Node.js.
Provisioning the add-on
Requirements before installing the Bluzelle DB add-on:
- Install the Heroku CLI (see this page for installation instructions)
- Deploy an application on Heroku
The Bluzelle DB add-on can be attached to a Heroku application using the Heroku CLI:
$ heroku addons:create bluzelledb:test -a YOURHEROKUAPP
After the add-on is successfully added, you can use the 3 configuration variables in your application’s code (your previously deployed Heroku application) to connect to the Bluzelle DB.
$ process.env.BLUZELLEDB_ADRESS (ex. ws://testnet.bluzelle.com) $ process.env.BLUZELLEDB_PORT (ex. 51010) $ process.env.BLUZELLEDB_UUID (ex. d5ffc87e-b447-43cd-980e-53feed3b1afe)
For more detailed instructions, please visit the Bluzelle DB add-on GitHub repository here.
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
$ heroku config:get ADDON-CONFIG-NAME -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.
Bluzelle DB can be configured for use in a local development environment. To do this, you would export the environment variables mentioned above in Provisioning the add-on. You will then be able to run your service locally and it will talk to the Bluzelle API.
You can install the Bluzelle JS library to interact with your data in the Bluzelle DB.
Using with Node.js
To use the Bluzelle JS library, you must have Node.js and NPM installed.
Node.js applications will need to add the following entry into their package.json specifying the Bluzelle JS library.
npm install --save bluzelle
var BluzelleClient = require('bluzelle'); const bluzelle = new BluzelleClient( process.env.BLUZELLEDB_ADDRESS + ':' + process.env.BLUZELLEDB_PORT, process.env.BLUZELLEDB_UUID ); await bluzelle.connect();
For help with installing Node.js, please reference Installing Node.js via package manager on the Node.js website.
For any problems or needing guidance to connect to the Bluzelle DB using the Bluzelle DB add-on, please do not hesitate to reach out in the Bluzelle Gitter Channel.
Migrating between plans
Application owners should carefully manage the migration timing to ensure proper application function during the migration process.
To change your Bluzelle DB add-on plan, run the command:
$ heroku addons:upgrade bluzelledb:newplan
Removing the add-on
Please let us know in the Bluzelle Gitter Channel as to why you are removing the add-on! Your constructive feedback helps us improve.
To remove the add-on, you can run the following Heroku CLI command:
This will destroy all associated data and cannot be undone!
$ heroku addons:destroy bluzelledb -----> Removing bluzelledb from sharp-mountain-4005... done, v20 (free)