[rules-users] Sliding window behavior in stream mode and realtime clock

Wolfgang Laun wolfgang.laun at gmail.com
Tue Dec 6 12:48:50 EST 2011


See below.

On 06/12/2011, MarcoMojana <marco.mojana at exmachina.ch> wrote:
> Hi,
>
> The situation is the following: we need to process a stream of delayed
> events. This means that the event timestamp is provided for each one
> of them and that it doesn't generally correspond to the system time when
> we insert them in the entry-point. The events delay may vary, but they
> are always inserted in chronological order. My questions refer to the
> enclosed implementation and are:
> 1) Given my source code, would the timestamps correctly read and used?

I haven't checked this carefully, but it seems that your declare's contain
@timestamp(...) referring to the correct field - so why not?

> 2) I would like that the "time window" behaves as if it is initially
>    placed at t = -inf and, when a new event is inserted in the
>    entry-point, it would slide to the time of the last event timestamp.
>    In my code I have used the stream mode and a realtime clock: is it
>    correct?

A virtual ("pseudo") clock is indicated. The timestamp of the facts
should control the advancement of the clock.

-W



More information about the rules-users mailing list