Web 3.0 database built on Cockroach
Switch branches/tags
Clone or download
Pull request Compare This branch is 1353 commits ahead, 3002 commits behind cockroachdb:master.
Latest commit 223e659 Nov 25, 2018

README.md

What is Picolo?

Picolo is a database network built for web 3.0. It gives developers a new way of storing data on a decentralized network of nodes close to their users.

Status

Picolo is in prototype stage. See our Roadmap for a list of features planned or in development.

Quickstart

  • Install dependencies
npm install pg request async
  • Create an app
const pg = require('pg')
const request = require('request')

request.post('https://us-central1-flares-d1c56.cloudfunctions.net/createApp', { json: { name: 'testApp' } },
    (err, res, body) => {
        console.log(err, body)
    }
)
  • Connect to an app
const pg = require('pg')
const request = require('request')

let pool = new pg.Pool()
request.get('https://us-central1-flares-d1c56.cloudfunctions.net/getApp/testApp',
    (err, res, body) => {
        console.log(err, body)
        if (!err && res.statusCode == 200) {
            pool = new pg.Pool({connectionString: body,})
        }
    }
)
  • Run queries
const pg = require('pg')
const request = require('request')

// Create a table
pool.query('CREATE TABLE IF NOT EXISTS t3 (id UUID PRIMARY KEY DEFAULT gen_random_uuid(), name STRING)', (err, res) => {
    console.log(err, res)
})

// Insert some data
pool.query("INSERT INTO t3 (name) VALUES ('picolo')", (err, res) => {
    console.log(err, res)
})

// Query it
pool.query('SELECT name FROM t3', (err, res) => {
    console.log(err, res)
    res.rows.forEach(function(row) {
        console.log(row)
    })
})

pool.end()

Full example is here

Run a node

Picolo is a decentralized network with an open participation model. Anyone can run a node and contribute to the capacity of the network.

On linux

curl -L https://github.com/picolonet/storage/releases/download/1.0.0/picolo-linux-amd64.tar.gz | tar xvz
sudo cp -i picolo /usr/local/bin
picolo

On mac

curl -L https://github.com/picolonet/storage/releases/download/1.0.0/picolo-darwin-amd64.tar.gz | tar xvz
sudo cp -i picolo /usr/local/bin
picolo

On windows

  • Download archive
  • Navigate to the directory and extract the archive
  • In command shell, run .\picolo.exe --nofork

Need Help?

  • Join us on Gitter - This is the most immediate way to connect with Picolo engineers.

Roadmap

  • Replace RAFT consensus with a version that is tolerant to Byzantine faults
  • Replace network layer with an optimized DHT based layer
  • Replace discovery service with the network layer