aphyr/riemann — pull request #309 by pyr (2014-01-13 09:58:10+00:00)
Title: top: keep events not values, demotions to top&bottom streams

Now that the index deletes expired events, demotions can be
handled in a cleaner way. Instead of keep a map of event key
to value in top's internal state, we keep a map of event key
to event, when an event gets bumped from the top, instead
of needing to provide a third stream, the initial event
will be re-streamed to the bottom stream and an expired version
will be sent to the top stream.

The behavior remains optional since and can be toggled with
the `demote?` argument.