flatiron/resourceful — pull request #133 by rrichardson (2013-01-12 20:11:35+00:00)
Title: Added Redis engine 

This is a minimum viable Redis engine that works against trunk.
**A couple notes:**
1. This depends on a pull request for utile.filter https://github.com/flatiron/utile/pull/21
2. Redis returns unordered results, so tests that expect an ordered array of results usually fail, although the content of the arrays is otherwise correct.
3. There seems to be a bug indicated by relationship-test line 477 where a child object from a different hierarchy is not getting deleted, this is causing a 'cannot read property 'status' of null' error because the record is being retrieved.

**On performance**

This implementation is intentionally very simple, it doesn't use a Redis sorted set as a second index to store collections. Instead, it uses KEYS 'hierarchy/blah/*' to fetch stuff. This is a full scan, and is by nature slower if you're performing an operation that requires multiple keys. In practice this shouldn't be a problem until one gets a couple million keys.

The tradeoff is that I don't have multiple round-trips to do basic tasks like create/save.

If this becomes a problem, I'll implement the 2nd level index for collections.