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.
Picolo is in prototype stage. See our Roadmap for a list of features planned or in development.
- 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
Picolo is a decentralized network with an open participation model. Anyone can run a node and contribute to the capacity of the network.
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
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
- Download archive
- Navigate to the directory and extract the archive
- In command shell, run
.\picolo.exe --nofork
- Join us on Gitter - This is the most immediate way to connect with Picolo engineers.
- 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