BigchainDB CRAB (Create, Retrieve, Append and Burn) Tutorial

What is BigchainDB?

BigchainDB is a scalable blockchain database. It’s designed to merge the best of two worlds: the “traditional” distributed database world and the “traditional” blockchain world.

BigchainDB starts with a traditional distributed database (initially RethinkDB), which has characteristics of:

  • scale (throughput, capacity, low latency), and
  • query ability.

From that, we engineered in blockchain characteristics:

  • decentralized (no single entity owns or controls it),
  • immutable (tamper-resistance), and
  • assets (you own the asset if you own the private key, aka blockchain-style permissioning).

BigchainDB supports both public and private deployments. Writes take less than a second because validation is based on a federation of voting nodes. BigchainDB’s querying isn’t in place yet, but will directly leverage the underlying database’s query functionality. From our experiments so far, BigchainDB’s architecture points towards 1 million write per second throughput and storing petabytes of data (via sharding).

Being a decentralized database, BigchainDB is complementary to decentralized processing technologies like Ethereum Virtual Machine, and decentralized file systems like IPFS. It can be used within decentralized computing platforms like BlockApps-Stratos or Eris-Tendermint.

Create a new folder called “bigchaindb_crab”.

Set up a new npm package.

Install bigchaindb-orm using npm.

Create the following directory structure and contents:

Edit the connect.js file.

Edit the crab/append.js file.

Edit the crab/burn.js file.

Edit the crab/create.js file.

Edit the crab/retrieve.js file.

Run node js file.

BigchainDB CRAB

Source Code

(Visited 722 times, 1 visits today)
Advertisements

Yong Loon Ng

Ng Yong Loon, better known as Kristofer is a software engineer and computer scientist who doubles up as an entrepreneur.

You may also like...

Leave a Reply

Your email address will not be published. Required fields are marked *