pressly/qmd — pull request #21 by dkua (2014-07-25 02:30:01+00:00)
Title: QMD Refactoring

### This PR is not backward compatible. Will require a change in deployment strategies.

This PR brings some major changes to QMD which include:
* The base repo is now an importable library
* The base repo contains two importable parts, `Server` and `Worker`
* The previous solo `qmd` binary has been split in two and decoupled
* The binaries have been moved to the `cmd/` directory
* `qmdserver` is the server/API half of QMD
* `qmdworker` is the worker half of QMD
* `qmd_to_keen` sends job results to keen.io for metric collection
* `qmd_to_slack` sends job results to a Slack channel for notification
* `Worker` and their child `Job` no longer reply to requests directly, there is now a NSQ topic named `result` which they publish to
* `qmdserver`, `qmd_to_keen`, and `qmd_to_slack` receive and parse `result` topic'd messages
* This allows the inclusion of different services without needing to change the core QMD library
* This has the added benefit of allowing results to be queued up in the case a binary going down
* Requests now have a user definable `TTL`, any job taking too long will be killed
* `Server` and `Worker` communicate through a `job` topic in NSQ.
* **Synchronous** requests have now been implemented
* `qmdserver` and `qmdworker` can now be configured through CLI flags **and** and config files, with config files taking precendence

The following issues are closed in this PR:
* Blocking authentication using Redis has been moved over to the gohttpware library as of this commit: https://github.com/pressly/gohttpware/commit/5a4f361250fa98b19c736ab59eb409bdb98fe4a6. This closes issue #14.
* Sane defaults exist which closes issue #11
* Proxying nsqadmin through qmdserver has been implemented which closes issue #13
* Metric collection has been added through the use of qmd_to_keen which closes issue #7