Hi
I've started a new project a couple of weeks ago and just published to
github/npm. As the title says, its a NoSQL database implemented in pure
javascript(typescript).
The initial motivation was to have a couchdb-like database with atomic
multi-document transactions, but as the development evolved I started to
see more potential than what was initially was planned. Here are some of
the features I have in mind:
- CouchDB-inspired (should be friendly to CouchDB users)
- ACID multi-document transactions(transactions are fully isolated,
implemented using MVCC)
- Very powerful data processing framework that was inspired by CouchDB
map/reduce(in progress)
- Runs in any javascript platform(uses abstraction layers for
platform-specific features) with a pluggable storage implementation(on
node.js it uses the 'fs' module, on web browsers it can use localStorage or
memory)
The API is extremely simple, example of the synchronous API used in the
REPL(assume '/var/lib/archdb' is an empty directory) :
> db = openDb({type: 'local', storage: 'fs', path: '/var/lib/archdb'});
> tx = db.begin();
> customers = tx.domain('customers'); // Domains are logical groups of
documents(similar to tables in sql databases)
> customers.ins({name: 'John', age: 30}); // adds a new record and
return its automatically generated key
1
> customers.ins({name: 'Doe', age: 30});
2
> old = customers.set(2, {name: 'Johndoe'}); // the 'set' method can
update or create a new record, and returns a reference to the old record
> customers.set('old doe', old)'; // keys can be numbers, strings,
arrays, uids or dates
> old = customers.del(1); // deleting also returns the old reference
> customers.set('old john', old);
> cursor = customers.find({$like: 'old'}) // finds all keys that starts
with 'old'
> cursor.next()
{name: 'John', age: 30}
> cursor.next()
{name: 'Doe', age: 30}
> cursor.next()
undefined
Soon I will publish documentation. I invite anyone interested in giving
feedback or helping development to join me at
https://github.com/tarruda/archdb
--
--
Job Board: http://jobs.nodejs.org/
Posting guidelines:
https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines
You received this message because you are subscribed to the Google
Groups "nodejs" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/nodejs?hl=en?hl=en
---
You received this message because you are subscribed to the Google Groups
"nodejs" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.