Embedded Storage Alternatives for NodeJS
Of the noted databases, the most well supported by Node.js is leveldb, via the level
module. Just
npm install level
for everything you need to get started. level
is a metapackage that bundles levelUP (exposes the leveldb methods) and levelDOWN
(compiles and provides an interface to leveldb). See the levelUP
documentation for the exports
provided by level
.
It's worth noting that this is a suitable solution only if your application will be running on a single machine, since the database is saved to the filesystem. If you scale to multiple servers you'll need to move away from an embedded datastore.
I was asking my self the same question 1 year ago, and I went with EJDB.
I needed a portable local storage for a "local" backend.
I've tried it so far with the following configurations:
MacOSX + node.js + EJDB
Windows 7 + node.js + EJDB
Debian + node.js + EJDB
It worked fine for 10 users. I guess you could have more: i'm just guessing.