[rules-users] Persistence and event expiry

Wolfgang Laun wolfgang.laun at gmail.com
Tue Aug 27 10:24:15 EDT 2013


There is no telling whether this works "as intended" because there is
no documentation (I know of) that would describe the intentions of
automatic expiry.

(My thoughts on the matter: But a session started in STREAM mode
begins with something I like to compare to the Big Bang, and there is
no Time before that. So:
what should a system do with an event that's timestamped with an
impossible time? Restarting a real-time session with a *state* is all
right, but events have disappeared below the horizon.)

I'd not bank on automated expiry and take things into my own coding hands.

-W



On 27/08/2013, DanielStahl <daniel.stahl at ericsson.com> wrote:
> Hi,
>
> I'm quite new to Drools, and very excited about the possibilities it offers,
> but I need a bit of advice. I'm using Drools 6.0.0.CR1 to run a Stream
> session in my application.
>
> The application will be running for extended periods of time, so I need to
> be able to delete facts over time. I can solve that nicely by declaring them
> as events and letting them expire either implicitly or explicitly.
>
> I also need the session to be persistent, so that if the application
> restarts it resumes from any previously saved state. I can do that by
> creating my own ObjectMarshallingStrategy and adding an EventListener,
> marshalling upon insert/update/deletion of facts, and then unmarshalling
> upon startup. That works.
>
> My problem is that unmarshalled events never expire. To exemplify: Event A
> will expire after 30s. Before that happens, though, the application restarts
> and unmarshals the session. Event A is now still in the fact base of the
> restarted session, but it will never expire. Since I'm new to Drools, I'm
> assuming I'm doing something wrong, but I'm not sure what. So my question
> is: is my setup reasonable, or is there a better way to achieve this? Is
> this working as intended, or a bug? If working as intended, is there a
> workaround?
>
> Best regards,
> Daniel Ståhl
>
>
>
> --
> View this message in context:
> http://drools.46999.n3.nabble.com/Persistence-and-event-expiry-tp4025697.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