graphite-project/graphite-web — pull request #605 by justanyone (2014-01-24 22:07:05+00:00)
Title: Adding ability to store datapoints in MongoDB

NOTE: This code works. I have a running installation that presents graphs now, without any ceres or other datastore.

This is a large pull request, with many modifications. Perhaps it doesn't need to be immediately accepted, but someone should review the changes made.

Features: added ability to store data in a MongoDB database.

* added new finder for Mongodb;
* changed readers.py to a directory containing several readers, including Mongodb;
* had to change node so it wouldn't read the data twice - added an optional param to Node's __init__();
* added some code to write data to the Mongodb database, not done yet.
* added a directory named /opt/graphite/webapp/graphite/backends/mongodb with all code required in it;
* roadmap is to add memcache or redis support in the same way as MongoDB;
* added DataNormalizer.py which normalizes non-timeseries data. That is, it converts data stored as an array of tuples (timestamp, value) into a timeseries data structure of (starttime, interval, endtime) and an array of values. This was necessary because we cannot necessarily determine when the datapoints will arrive ahead of time.

That said, there is still work to do, but I'd like to get this stuff out there reasonably soon for review and modification as is deemed necessary by ... whomever is handling this pull request.