pyr/cyanite — pull request #35 by addisonj (2014-05-05 20:41:23+00:00)
Title: Add in support for elasticsearch path store

This adds in support for an elasticsearch path store.

As far as I can tell, its working pretty well. I am going to test this against my cluster today to try and see just how much it helps performance. I will update the PR with the results.

There is currently one minor issue, when you select a path for retrieval, if any metrics have that path as a prefix (foo.bar.baz, foo.bar.baz2), both are included. This should be easy to fix, but wanted to get feedback first.

Implementation notes:
Elastisch is used for the implementation and both the native and rest interfaces are supported via different implementations of the Pathstore protocol.

Paths are stored in elasticsearch as:
```json
{
"path" : "foo.bar.baz",
"depth" : 3,
"tree": false
}
```
All paths, both leaf and tree paths, are stored. This allows for quick querying and a wildcard search is used which very closely matches the current behavior.

Also, this is by far the most substantial piece of clojure I have written, so feel free to pull it apart, looking for the feedback as well!