<div dir="ltr">IMO that&#39;s a very difficult problem to solve.. because if you want to do it every X seconds you can be caught in the middle of an execution. If you delay the snapshot creation for when the execution ends, you will probably caught in the next snapshot creation. <div style>

Depending on what are you doing within your rules, you can always recreate the session from the scratch. You can also use rules to summarize state and persist that summaries in your external database, that can save you some time.</div>

<div style><br></div><div style>HTH</div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Mon, Aug 12, 2013 at 8:52 AM, IK81 <span dir="ltr">&lt;<a href="mailto:ml@kofler.me" target="_blank">ml@kofler.me</a>&gt;</span> wrote:<br>

<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi,<br>
<br>
I am looking for a solution to make the engine&#39;s state persistent in regular<br>
intervals. I do not want to persist the engine&#39;s state at every event<br>
insertion for performance reasons. Instead I am thinking of making a<br>
snapshot of the engine&#39;s state let&#39;s say every X seconds. The events I have<br>
are always stored to a database. In case of a crash or reboot I&#39;d like to<br>
recover the engine&#39;s state from the snapshot + reinserting the events that<br>
happened after the timestamp of my snapshot.<br>
<br>
Are there any hints or caveats regarding this approach?<br>
<br>
Best regards,<br>
Ingo<br>
<br>
<br>
<br>
<br>
--<br>
View this message in context: <a href="http://drools.46999.n3.nabble.com/Snapshot-of-drools-engine-s-state-tp4025457.html" target="_blank">http://drools.46999.n3.nabble.com/Snapshot-of-drools-engine-s-state-tp4025457.html</a><br>


Sent from the Drools: User forum mailing list archive at Nabble.com.<br>
_______________________________________________<br>
rules-users mailing list<br>
<a href="mailto:rules-users@lists.jboss.org">rules-users@lists.jboss.org</a><br>
<a href="https://lists.jboss.org/mailman/listinfo/rules-users" target="_blank">https://lists.jboss.org/mailman/listinfo/rules-users</a><br>
</blockquote></div><br><br clear="all"><div><br></div>-- <br><div dir="ltr"> - MyJourney @ <a href="http://salaboy.wordpress.com" target="_blank">http://salaboy.com</a><div> - Co-Founder @ <a href="http://www.jugargentina.org" target="_blank">http://www.jugargentina.org</a><br>

 - Co-Founder @ <a href="http://www.jbug.com.ar" target="_blank">http://www.jbug.com.ar</a><br> <br> - Salatino &quot;Salaboy&quot; Mauricio -</div></div>
</div>