Interval events

This is quite amazing that database can include the notion
of time for historical queries - emitting “interval occurred” event and then
acting on it - simplifies a lot. This is, IMHO, real differentiation.

I, as a user, could emit those events manually, but to query
on historical data, I have to keep them forever (not to mention problems when events aren’t emitted). Would it be a good idea to
create ‘$month, $hour, $second’ system events that are emitted logically
(in-memory) without persisting to disk?

So you can roughly do this from the outside. If you were to have a job from the outside that wrote an event to a stream called seconds and set a $maxcount to 1 (the events will be scavenged)

I wouldn’t be able to do historical queries on “seconds” event if it is scavenged, is it correct?

That would be correct. However there are alternatives in how it can be done such as looking at times between the events and triggering logic internally yourself. eg:

I get one event at 12:00:12 then my next is 12:00:17 I could trigger a loop of 5 second intervals.



Thanks. This is exact logic I was thinking of.