dotcloud/hipache — pull request #89 by dmp42 (2014-03-20 20:05:53+00:00)
Title: Alternate drivers

Hipache now supports alternatives to Redis (namely memcached and etcd)

Configuration for the "driver" now expresses as:
* `{"driver": ["provider://username:password@host:port/database#prefix", "...", "provider://master_or_cluster"]}`

"Classical" redis reads as:
* `{"driver": ["redis://:password@slavehost:slaveport/database#prefix", "redis://masterhost"]}`

Memcached reads as:
* `{"driver": ["memcached://host:port", "memcached://anotherone", "memcached://athirdone"]}`

Etcd reads as:
* `{"driver": ["etcd://host:port"]}`

More info in lib/drivers.

In a nutshell:

* redis is still the default, and code is *pretty much unchanged* (stuff moved from `cache` to `redis` though)
* there should be very little extra complexity over the previous code-path when using redis default - and that should stay so: https://github.com/dotcloud/hipache/blob/la-jolla/lib/drivers/factory.js
* the old configuration is still supported: https://github.com/dotcloud/hipache/blob/la-jolla/lib/cache.js#L12
* the alt. drivers are dreadfully experimental, and not advertised (though there are tests, and they kind of work)
* I would like to ship this in a 0.3 version
* the following step (to be shipped in 0.4) is to stabilize a driver API and allow *separate* node-modules to act as "drivers" (named: `hipache-driver-*`) - the idea being to keep the actual Hipache almost unchanged, and allow for extra code out of the main repo to act as plugins so to let people implement third-party (mongo / raven / *sql whatever poison) drivers if they want - the step after that being world domination

This should fix #69 #87 #88 and incidentally #76

Also, there is a lot of additional unit test now (in js), and some infos about the tests in test/README.

Now, this is a big PR, so:

* let's take time to review this and discuss it if need be - especially the new configuration syntax
* IMHO, this is big enough to deserve a version bump - considering there are a number of other fixes on master now, maybe we can release a new version in 0.2 line BEFORE merging this?