Inspired by meteor
Why?
- I wanted a decoupled library with the same level of functionality provided in meteor
- Cached on the client-side, and server-side. Less hits to mongodb itself.
- Allows for users to be sandboxed in their own collection (authentication).
- listening to cursors for any change
TODO
- fork mongoose ODM and use this as the default driver
- REST interface mapper
- sync items to backend (persistence api)
- rest gateway example
- DNode driver
- Http driver
- object modifiers: $inc, $set, $unset, $push $pushAll, $addToSet, $pop, $pull, $pullAll, $rename, $bit (should be separate repo - fiddle?)
- cursor.emit("update") when limit, selector, or skip have changed
Examples
Here's a simple example using the memory driver:
var mdblite = db = mdblite; var people = db; //add some datapeople; //create a filter against the "people" collectionvar peopleOlderThan21 = people; peopleOlderThan21; //insert a new user, triggers listener abovepeople