Giter VIP home page Giter VIP logo

jaindb's Introduction

jaindb

JainDB is a blockchain based data warehouse for JSON objects. It provides a REST API to interact with the data store. Jaindb is using REDIS, CosmosDB or just the File-System to store the data by using hashing and deduplication technologies.

Jaindb was initially created to store inventory data of computers in an auditable way with the history of all changes. But as jaindb is schema-less, it can store everything you want...

It's using blockchain technology, but data is not distributed and no CPU power is required to calculate a "proof of work".

Overview

overview

Interrested ? Check the Quick-Start Guide in the Wiki Section...

Data Store

Jaindb can store data fragments on:

  • File System (slow but simple)
  • Redis Cache (fast and easy to setup)
  • CosmosDB (scalable cloud service)

It splits the original data into blocks (JSON Objects) that can be referenced from other data sources.. An example on inventory data of an audio device on a computer:

"Audio": [
    {
      "##hash": "9qZnR1RLHiwJK1tbVpfrAkDX5"
    },
    {
      "##hash": "9qZpHGtxLiUYSaoZ3QGeXum35"
    }
  ]

this device has two audio devices, but just the hash values are stored on the audio object, so other computers with the same audio device do not have to story any additional data, just link to the existing data which is the reference to the hash value.

at the end, the hash value of the inventory data that contains all the hash references will be stored and added to a blockchain:

{
  "Chain": [
    {
      "index": 0,
      "timestamp": 636471513240444298,
      "previous_hash": "",
      "hash": "x3gVMwVt+Snzj8b9Gln8sp4Ujw/E2jtX6KfcEzWluhA=",
      "nonce": 1,
      "data": "",
      "signature": "",
      "blocktype": "root"
    },
    {
      "index": 1,
      "timestamp": 636471513242139314,
      "previous_hash": "x3gVMwVt+Snzj8b9Gln8sp4Ujw/E2jtX6KfcEzWluhA=",
      "hash": "/mJCe9E/OukY3udxiMt6yLpFQ79dNn66qc5iHCT1AUU=",
      "nonce": 2,
      "data": "9qZNqUJ2H3Jso71NEPc6FCQyS",
      "signature": "",
      "blocktype": "INV"
    },
    {
      "index": 2,
      "timestamp": 636472149162185683,
      "previous_hash": "/mJCe9E/OukY3udxiMt6yLpFQ79dNn66qc5iHCT1AUU=",
      "hash": "Tst3z3gdq2krnDzj4R6DpeAUwFbN1GzbmrSe5il0NSc=",
      "nonce": 3,
      "data": "9qZQ2AxdCqkz15nyMTLxyGkii",
      "signature": "",
      "blocktype": "INV"
    }
  ]
}

If something changes on the asset data, a new block with a reference to the list of all hashed inventory data ("data" attribute) will be added to the blockchain.

Storing data in hashed blocks is great to save disk space but it requies an API to convert the data back into a readable format. JainDB provides a REST API to upload and query data. https://github.com/rzander/jaindb/wiki/REST-API

Docker Image: https://hub.docker.com/r/zanderr/jaindb/

jaindb's People

Contributors

rzander avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.