[rules-users] Snapshot of drools engine's state

Wolfgang Laun wolfgang.laun at gmail.com
Mon Aug 12 06:06:44 EDT 2013


On 12/08/2013, IK81 <ml at kofler.me> wrote:
> I understand. But in my case the state might change even if i do not
> insert new events because I have rules
> that fire if I have event A but no event B within X seconds after A.
> For that purpose I'll use a timer
> that advances the clock and calls the fireAllRules without any
> insertion.

This does not preclude saving based on event insertion count as you
can monitor inserts by listening.

But this timer introduces real time. How do you propose to replay this
when you restart your session using saved data?

>
> Is my assumption right that the engine will behave deterministic when I
> replay the events on my
> snapshot using an external (pseudo?) clock. I've tested it and from my
> observations it seemed to be
> deterministic - but I haven't looked at the engine's internals so far.

I think so. But then your engine will continue with a pseudo-clock.

> I plan to persist my events with the timestamps of their occurrence and
> the timestamp when I insert them into the engine.
> So will I always end up with the same propagation numbers etc.?

Only one timestamp is used as the one on which rule evaluations are based.

I may  have missed something, but I don't think you can build a system
that provides continuous real-time operation for event processing by
using backup and recovery.

-W

>
> Ingo
>
>
>
> --
> View this message in context:
> http://drools.46999.n3.nabble.com/Snapshot-of-drools-engine-s-state-tp4025457p4025467.html
> Sent from the Drools: User forum mailing list archive at Nabble.com.
> _______________________________________________
> rules-users mailing list
> rules-users at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/rules-users
>


More information about the rules-users mailing list