Persistent keystore for the node.js process

I need to store some metadata in the node.js application that I am writing. Instead of coming up with my own file format and managing this file, I would like to use a keystore to store in the process.

I looked at mongodb, but it seems that mongodb should always be run outside the process (that is, you first need to start the mongo server and then connect to it in node.js.) I need to, no matter what it is, that it exists completely within the framework of the node.js process - or at least that any external processes are completely controlled by the transparent library and kill them when the application closes the connection.

I don’t really like the performance, but it would be nice to support asynchronous I / O in the storage in order to keep up with Node the entire asynchronous version.

It would be nice if the indexes supported the repositories, as I would definitely query the data in such a way that the indexes were useful.

I am pretty sure that "sqlite" will work for me, except that I really don't find it almost as convenient as key storage. Ideally, I should be able to speak in JSON, not SQL. But sqlite will work if nothing better.

Thank!

+5
source share
6 answers

You may be interested in using redis http://redis.io/

node https://github.com/mranney/node_redis

:

var redis = require("redis");
var client = redis.createClient();

client.set("foo_rand000000000000", "OK");
+2

https://github.com/sergeyksv/tingodb. MongoDB API, MongoDB, .

+3
+2

, final-db.

FinalDB . , nocql . () - , , .

+1
0

...

var store = { };

//store 'myKey'
store.myKey = { foo: 'bar' };

//fetch 'myKey'
var x = store.myKey;

, Googling , http://pgte.github.com/alfred/

, . (, Redis)

-1

All Articles