VinceMacBuche/rudder — pull request #2 by fanf (2013-09-01 22:49:24+00:00)
Title: Some cleaning on datastructure and alternative split/merge algo

I spent some time reviewing the propose code and cleaned some little things along the way.

Doing the review, I was lost several time about why or when should or should not be merged, or extended, or updated. The logic is complexe, so I looked for a way to simplify it.

I believe I found one by normalizing all interval endpoints on a reference set of edge. The reference set will be given by the execution timestamp of the agen for the node (now that we are going to store them), plus execution timestamp of new reports.
Logic of the full algorithme is explained in file UnitAggregationService. It is implemented, but not tested at all, and misses lots of sanitization (what happen if we have no execution timesptamps, but aggregated reports? And other niceties), but I wanted to have actual code to discuss the thing.