I have a dream
A dream that one day I will be able to use a NoSQL database solution built on NodeJS. A dream that people won’t laugh at my desire to build such a database. A dream that it will work well, and that it will bring together all the best features from my favorite NoSQL databases into one product. A dream that someday I will have the time to spend on something like this, and to learn about Amazon Dynamo/map-reduce/file-journaling/etc hands on in a language I enjoy.
I’m actually completely serious. For some this dream might be a nightmare (the Java-heads I work with at my day job think I’m insane). But I think it would be completely awesome. And what’s more, I think there will be a lot of other people who think the same.
I’ve written an extensive list of features I’d like for this so that if I ever get time to work on it I can remember what I wanted. Features come from Riak, CouchDB, MongoDB, and my own imagination. Here are the highlights:
- It should be written amazon dynamo-style so that adding/removing servers is simple when growing/shrinking the cluster, maintenance is easier
- RESTful interface, probably bucket/database then key (e.g. /db-name/doc-key)
- Ability to have map, reduce, and update functions stored as documents in the database and referred to by name (bucket/key) in map/reduce/update queries. Also ability to store complete queries as documents in the database.
- Pre/post commit hooks on documents allowing validation as well as other-domain side-effects such as sending an email when a document is stored, full nodejs abilities
- Index creation (like CouchDB views?), but allow sorting
- Robust URL rewriting so that one might write a self-hosted application
- User authentication and permissions, pluggable authentication mechanisms
- Pluggable storage system, in-memory, disk, S3(?)
- Replicatable like CouchDB so you can have replicates across data-centers, or even partial data on your local machine, maybe even mobile someday
- Admin GUI for managing the cluster, and email notifications that can be sent out