joindin/joindin-web2 — pull request #68 by magicmonkey (2014-01-21 00:04:29+00:00)
Title: Replace Mongo usage with Redis

I've done a fair amount of surgery in this PR, so it needs quite a few eyes cast over it before progressing.

As well as removing usages of Mongo (and the ```\Joindin\Service\Db``` class), I've changed the events API calling code to work more like the talks API calling code so that it uses an intermediate ```\Joindin\Model\Db``` class in between the relevant controller and the ```\Joindin\Model\API``` class. I believe this was the intention when the talks pages were added, and having them both work the same way increases consistency.

There were also a lot of ```$config->getConfig()``` and ```new Config()``` calls, so I've instantiated the config object in the ```\Joindin\Controller\Base``` class and stored the result of its ```getConfig()``` call for reference in the extending controllers. They pass this in to wherever else it's used, so they can still be tested in isolation as necessary, it's just a bit DRYer.

To run this, you should have a (plain unconfigured) Redis running. Note the extra config to choose which Redis DB to use.

It is currently likely storing too much data in Redis, and is doing quite a few round-trips (particularly when ```SELECT```ing the Redis DB), but I consider these as opportunities for future performance improvements.

Please try it out, click around, try to break it.