tigerdatabase
v0.8.4
Published
NoSQL in-memory and distributed database engine.
Downloads
2
Maintainers
Readme
TigerDatabase
NoSQL in-memory and distributed database engine.
Starting an local TigerDatabase
var TigerDatabase = require('TigerDatabase');
var tigerdb = new TigerDatabase();
tigerdb.createCollection('users');
tigerdb.users.insert({username: 'zarmack', password: '*', role: 'admin'});
tigerdb.users.insert({username: 'espagueti', password: '*', role: 'users'});
tigerdb.users.insert({username: 'donatello', password: '*', role: 'users'});
tigerdb.users.find();
Create a table, populate it and dump it to a JSON file
var uuid = require('node-uuid');
var async = require('async');
var TigerDatabase = require('TigerDatabase');
var tigerdb = new TigerDatabase();
tigerdb.createCollection('garbage');
async.waterfall([
function(callback) {
var i = 1;
for (i = 0; i < 1000; i++) {
var record = {};
record.number = i;
record.string = i.toString();
record.token = uuid.v4();
tigerdb.garbage.insert(record);
}
callback();
},
function() {
tigerdb.save('garbage.json');
}
]);
Load a table from a JSON file
var TigerDatabase = require('TigerDatabase');
var tigerdb = new TigerDatabase();
tigerdb.createCollection('garbage');
tigerdb.garbage.load('garbage.json');
tigerdb.garbage.find({number: { $gt: 996, $lt 998 }}, { _id: 0 });
Clustered configuration
Creating a connector for a multicast clustered configuration
var TigerDatabase = require('TigerDatabase');
var TigerDatabaseMulticast = require('TigerDatabase-Multicast');
var multicastOptions = {
localIPAddress: '192.168.24.76',
multicastIPAddress: '224.0.2.3'
multicastIPPort: 19854
};
var tigerdb = new TigerDatabase();
tigerdb.addConnector(new TigerDatabaseMulticast(multicastOptions));
tigerdb.createCollection('garbage', { distributable: true, public: true });
tigerdb.garbage.load('garbage.json');
Creating a connector for a unicast clustered configuration
Integrate with third party software
Integrate TigerDatabase with Express 4.0
License
MIT License
See LICENSE.md for more info.