I’m not sure I understand the question.
You have two totally independent rule engine on two different servers running with
separate JVMs and sessions.
You happen to share data between the two sessions by updating a database but drools has no
knowledge of that (they are just java objects which happen to exist) and they certainly
aren’t the same object on both servers.
Temporal reasoning and correlation of events will therefore only happen on the facts that
are inserted into that processes working memory – there’s no way it could be any way else
as it only know about itself, there could be 10 or 0 other processes running it won’t know
the difference.
The ideal method is to have an application design where each request is totally
independent from all other requests (other than db state) and therefore you do exactly as
you have described – there is no other state to share. If you have to share state between
them you have a much bigger problem and you probably have to find some other way to
partition up the data into separate blocks.
Thomas
From: rules-users-bounces(a)lists.jboss.org [mailto:rules-users-bounces@lists.jboss.org] On
Behalf Of Neelesh Deo Dani
Sent: 02 August 2011 07:42
To: rules-users(a)lists.jboss.org
Subject: [rules-users] running multiple instance of rule engine
Hi,
I need a setup where multiple instance of drools rule engine will be running in different
physical hosts. In each host, a web server (API) will be running which will receive an
input event, process it and insert into rule engine (session) for rules execution on the
same host. I'm using external persistent datastore. The objects will be populated from
datastore before inserting into the session. After rule execution if there is any change
in the state of the objects the same will be stored back to the datastore. The datastore
calls are made outside the rule execution.
In this scenario, if an event comes to one host and another event comes to a different
host, how will the temporal reasoning or correlation of events work? What is the
recommended way of deploying multiple instance of rule engine for scalability?
Please help in this regard.
Thanks & Regards,
Neel
________________________________
**************************************************************************************
This message is confidential and intended only for the addressee. If you have received
this message in error, please immediately notify the postmaster(a)nds.com and delete it from
your system as well as any copies. The content of e-mails as well as traffic data may be
monitored by NDS for employment and security purposes. To protect the environment please
do not print this e-mail unless necessary.
NDS Limited. Registered Office: One London Road, Staines, Middlesex, TW18 4EX, United
Kingdom. A company registered in England and Wales. Registered no. 3080780. VAT no. GB 603
8808 40-00
**************************************************************************************