This adds a tickless engine, as discussed. This means that metrics are ingested (and inserted into the database) as they come. It's still not a 100% ready branch, I still wanted to improve several things and run some performance benchmarks while I'm at it, but this would be a good point to get the feedback.
Major differences with previous version:
engine is storing the metric state internally, and it's queryable (when there's a request, current metric is appended to the current request
metrics are flushed to Cassandra from Engine directly, they're being "pushed out" by the newer metrics
snapshots are based on the window logic. For example, for 5 second window, 5 seconds worth of data are getting into the window. I first thought we could do some rounding and grace periods, although with a 1 second resolution this sounds like an overkill.
Tests now got much simpler. Also, integrating compression stores might become a bit simpler now, since we keep logic coupled in engine, without any "writer" that ticks once every N seconds.
This adds a tickless engine, as discussed. This means that metrics are ingested (and inserted into the database) as they come. It's still not a 100% ready branch, I still wanted to improve several things and run some performance benchmarks while I'm at it, but this would be a good point to get the feedback.
Major differences with previous version:
Tests now got much simpler. Also, integrating compression stores might become a bit simpler now, since we keep logic coupled in engine, without any "writer" that ticks once every N seconds.
I would appreciate your thoughts on the patch!