node-sqlite3, thinly wrapped for use in a node cluster (useful for Raspberry Pi 2 and other multi-core arm devices)
Go to file
AJ ONeal 4e3b9b88f7 partial test 2015-07-21 19:03:29 -06:00
README.md partial work 2015-07-21 18:58:34 -06:00
client.js partial work 2015-07-21 18:58:34 -06:00
index.js partial test 2015-07-21 19:03:29 -06:00
install-sqlcipher.bash partial work 2015-07-21 18:58:34 -06:00
serve.js partial work 2015-07-21 18:58:34 -06:00
server.js partial work 2015-07-21 18:58:34 -06:00
wrapper.js partial test 2015-07-21 19:03:29 -06:00

README.md

DRAFT

This is just hypothetical while I build out the API

SQLite3 Server

Node.js runs on a single core, which isn't very effective.

You can run multiple Node.js instances to take advantage of multiple cores, but if you do that, you can't use SQLite in each process.

This module will either run client-server style in environments that benefit from it (such as the Raspberry Pi 2 with 4 cores), or in-process for environments that don't (such as the Raspberry Pi B and B+).

Usage

var sqlite = require('sqlite3-server');
var opts = {
  key: '1892d335081d8d346e556c9c3c8ff2c3'
, bits: 128
, storage: path.join('/tmp/authn.sqlcipher')
, verbose: false
, port: 3232 // default random
, forceServer: true // default false
};

sqlite.create(opts).then(function (db) {
  // EXACT same api as db
});