On November 2010 I blogged about wanting to have an in-process key-value store for node.js. I was displeased with the impedance mismatch between external datastores and node.js, and soon noticed there was nothing really similar to what I wanted. Following the advise from Tom Preston Werner, I created my own BOMTYCC problem.

Two months and a lot of long nights later, Alfred.js emerges.

To sum it up, Alfred.js is a key-document store to be used internally on node.js apps.

It uses append-only files, it has in-memory indexes, supports master-slave replication, supports atomic operations on one record , and some other features.

Also, you can - as in CouchDB -, to have a live feed of changes.

It supports a mongodb-similar query syntax, and also supports a power-user javascript finder interface.

Benchmarks

Speed is a major focus of Alfred.js.

I have some non-scientific benchmarks (which you will probably only understand if you get familiarized with the internals of Alfred.js and the benchmarks themselves).

They were done on my trusty MBP on a magnetic 5400RPM drive,  and yet they indicate you can do 15.000 to 20.000 writes per second may be possible.

They also indicate you can do 500.000 to 1.100.000 reads per second.

Hey, I may have some basic error on the benchmarks, but I would love to see these benchmarks running on a fast SSD…

Summing up

This is still experimental stuff. The API may change. It may delete your entire data. Use it at your own risk.

I still have to try it out with a lot of data to see how it behaves (I plan to use it on my next node-powered web app project).

But try it out. I hear it’s fast.

  1. buy-steroids-uk-dot-co reblogged this from metaduck
  2. metaduck posted this