[rules-users] rules-users Digest, Vol 72, Issue 55

Gurvinder Narula1 gnarula1 at la-z-boy.com
Tue Nov 27 12:19:09 EST 2012


Hi Mattias,


Thanks for the clarification. Appreciate the quick response.

Gurvinder



On 11/27/12 12:00 PM, "rules-users-request at lists.jboss.org"
<rules-users-request at lists.jboss.org> wrote:

>Send rules-users mailing list submissions to
>       rules-users at lists.jboss.org
>
>To subscribe or unsubscribe via the World Wide Web, visit
>       https://lists.jboss.org/mailman/listinfo/rules-users
>or, via email, send a message with subject or body 'help' to
>       rules-users-request at lists.jboss.org
>
>You can reach the person managing the list at
>       rules-users-owner at lists.jboss.org
>
>When replying, please edit your Subject line so it is more specific
>than "Re: Contents of rules-users digest..."
>
>
>Today's Topics:
>
>   1. Drools response time (elMateo)
>   2. Re: Drools response time (Mauricio Salatino)
>   3. Re: Drools response time (Luk?? Petrovick?)
>   4. Re: Drools response time (elMateo)
>   5. Re: Question about drools-spring in a multi-treaded container
>      (like tomcat). (Mattias Nilsson Grip)
>   6. Re: Inserting Different Objects Of Same Class ! (Greg Barton)
>
>
>----------------------------------------------------------------------
>
>Message: 1
>Date: Tue, 27 Nov 2012 16:06:58 +0100
>From: elMateo <soyelmateo at gmail.com>
>Subject: [rules-users] Drools response time
>To: Rules Users List <rules-users at lists.jboss.org>
>Message-ID:
>       <CAKx6_9aEY2GEYoY0LmWUcW2DyyPYmX_sAAFr=Ou_u4dxuB4jmQ at mail.gmail.com>
>Content-Type: text/plain; charset="iso-8859-1"
>
>Dear all,
>
>I need to develop an Expert System for a new project and I want to use
>Drools, butI have some restrictions.
>
>The most important restriction: response time of the application must be
>less than one second. Also, the application access to one data base to
>retrieve some information and send it to the expert systetm.
>
>With this information, can anyone tell me, approximately, the response
>time
>of  Drools? It is very important to can use Drools in this project. And we
>like very much to use it. (We use in other projects without these
>restrictions).
>
>Thank in advance.
>
>Best regards, Jes?s.
>-------------- next part --------------
>An HTML attachment was scrubbed...
>URL:
>http://lists.jboss.org/pipermail/rules-users/attachments/20121127/7bb4a857
>/attachment-0001.html
>
>------------------------------
>
>Message: 2
>Date: Tue, 27 Nov 2012 15:11:12 +0000
>From: Mauricio Salatino <salaboy at gmail.com>
>Subject: Re: [rules-users] Drools response time
>To: Rules Users List <rules-users at lists.jboss.org>
>Message-ID:
>       <CANzbnyVqkmBTHv7TxmUoV2ajVQ3bnQFpAyD3c-+yXs-jffAwLw at mail.gmail.com>
>Content-Type: text/plain; charset="iso-8859-1"
>
>Hi Jesus,
>Well do you want us to include the response time for your Database?
>The Drools Rule engine will keep all your facts inside the main memory
>(RAM) so it will be fast, but if you need to retrieve data from your
>database, you will need to take that into account. Depending on how you
>are
>doing that and how much data do you want to bring will be the response
>times.
>
>Cheers
>
>
>On Tue, Nov 27, 2012 at 3:06 PM, elMateo <soyelmateo at gmail.com> wrote:
>
>> Dear all,
>>
>> I need to develop an Expert System for a new project and I want to use
>> Drools, butI have some restrictions.
>>
>> The most important restriction: response time of the application must be
>> less than one second. Also, the application access to one data base to
>> retrieve some information and send it to the expert systetm.
>>
>> With this information, can anyone tell me, approximately, the response
>> time of  Drools? It is very important to can use Drools in this project.
>> And we like very much to use it. (We use in other projects without these
>> restrictions).
>>
>> Thank in advance.
>>
>> Best regards, Jes?s.
>>
>> _______________________________________________
>> rules-users mailing list
>> rules-users at lists.jboss.org
>> https://lists.jboss.org/mailman/listinfo/rules-users
>>
>>
>
>
>--
> - MyJourney @ http://salaboy.wordpress.com
> - Co-Founder @ http://www.jugargentina.org
> - Co-Founder @ http://www.jbug.com.ar
>
> - Salatino "Salaboy" Mauricio -
>-------------- next part --------------
>An HTML attachment was scrubbed...
>URL:
>http://lists.jboss.org/pipermail/rules-users/attachments/20121127/beb25222
>/attachment-0001.html
>
>------------------------------
>
>Message: 3
>Date: Tue, 27 Nov 2012 16:17:02 +0100
>From: Luk?? Petrovick? <lpetrovi at redhat.com>
>Subject: Re: [rules-users] Drools response time
>To: rules-users at lists.jboss.org
>Message-ID: <1354029422.7785.3.camel at steam>
>Content-Type: text/plain; charset="UTF-8"
>
>Mauricio Salatino p??e v ?t 27. 11. 2012 v 15:11 +0000:
>> Well do you want us to include the response time for your Database?
>> The Drools Rule engine will keep all your facts inside the main memory
>> (RAM) so it will be fast, but if you need to retrieve data from your
>> database, you will need to take that into account. Depending on how
>> you are doing that and how much data do you want to bring will be the
>> response times.
>
>Going low-level, your standard Oracle JRE / OpenJDK doesn't guarantee
>response time. If it is a hard requirement to have timely responses,
>you'll have to buy a real-time JRE from some commercial vendor.
>
>Regards!
>
>--
>Luk?? Petrovick?
>QE Lead, JBoss Enterprise BRMS
>Phone: +420 532 294 123
>irc: lpetrovi, triceo
>
>
>
>------------------------------
>
>Message: 4
>Date: Tue, 27 Nov 2012 16:24:19 +0100
>From: elMateo <soyelmateo at gmail.com>
>Subject: Re: [rules-users] Drools response time
>To: lpetrovi at redhat.com, Rules Users List
>       <rules-users at lists.jboss.org>
>Message-ID:
>       <CAKx6_9YB_bJcsO3NAtsyQAzJGDBc8DxD_q8t95WScczNccHyiQ at mail.gmail.com>
>Content-Type: text/plain; charset="iso-8859-2"
>
>Thank for your response, Mauricio and Lukas!
>
>BR, Jes?s.
>
>
>On Tue, Nov 27, 2012 at 4:17 PM, Luk?? Petrovick?
><lpetrovi at redhat.com>wrote:
>
>> Mauricio Salatino p??e v ?t 27. 11. 2012 v 15:11 +0000:
>> > Well do you want us to include the response time for your Database?
>> > The Drools Rule engine will keep all your facts inside the main memory
>> > (RAM) so it will be fast, but if you need to retrieve data from your
>> > database, you will need to take that into account. Depending on how
>> > you are doing that and how much data do you want to bring will be the
>> > response times.
>>
>> Going low-level, your standard Oracle JRE / OpenJDK doesn't guarantee
>> response time. If it is a hard requirement to have timely responses,
>> you'll have to buy a real-time JRE from some commercial vendor.
>>
>> Regards!
>>
>> --
>> Luk?? Petrovick?
>> QE Lead, JBoss Enterprise BRMS
>> Phone: +420 532 294 123
>> irc: lpetrovi, triceo
>>
>> _______________________________________________
>> rules-users mailing list
>> rules-users at lists.jboss.org
>> https://lists.jboss.org/mailman/listinfo/rules-users
>>
>-------------- next part --------------
>An HTML attachment was scrubbed...
>URL:
>http://lists.jboss.org/pipermail/rules-users/attachments/20121127/73145463
>/attachment-0001.html
>
>------------------------------
>
>Message: 5
>Date: Tue, 27 Nov 2012 17:04:07 +0100 (CET)
>From: Mattias Nilsson Grip <mattias.nilsson.grip at redpill-linpro.com>
>Subject: Re: [rules-users] Question about drools-spring in a
>       multi-treaded container (like tomcat).
>To: Rules Users List <rules-users at lists.jboss.org>
>Message-ID:
>       <1242554540.25824035.1354032247194.JavaMail.root at redpill-linpro.com>
>Content-Type: text/plain; charset=utf-8
>
>Hi Gurvinder,
>
>knowledge sessions are not thread-safe so I believe your assumptions are
>correct. To be on the safe side you should change the ksession bean to
>have scope "prototype".
>
>Regards,
>Mattias
>
>----- Original Message -----
>> From: "Gurvinder Narula1" <gnarula1 at la-z-boy.com>
>> To: rules-users at lists.jboss.org
>> Sent: Tuesday, 27 November, 2012 3:08:18 PM
>> Subject: [rules-users] Question about drools-spring in a multi-treaded
>>container (like tomcat).
>>
>> Hello all,
>>
>> I've been reading up about drool-spring integration and have put
>> together a simple project that wires together a KnowledgeBase and
>> KnowledgeSession as follows :
>>
>>
>> < drools:resource id = "GroupUnit" type = "DRL"
>> source =
>> "file:/Users/drools/drools-spring-test/src/Rules/drls/GroupUnit.drl"
>> />
>>
>> < drools:resource id = "GradeUnit" type = "DRL"
>> source = "
>> file:/Users/drools/drools-spring-test/src/Rules/drls/GradeUnit.drl"
>> " />
>>
>> < drools:resource id = "EvaluateUnit" type = "DRL"
>> source = " file:/Users/drools/drools-spring-test/src/Rules/drls/
>> EvaluateUnit .drl" " />
>>
>> < drools:grid-node id = "node1" />
>> < drools:kbase id = "kbase1" node = "node1" >
>> < drools:resources >
>> < drools:resource ref = "GroupUnit" />
>> < drools:resource ref = "GradeUnit" />
>> < drools:resource ref = "EvaluateUnit" />
>> </ drools:resources >
>> </ drools:kbase >
>>
>> < drools:ksession id = "ksession" type = "stateful" kbase = "kbase1"
>> node = "node1" />
>>
>...
>>
>> The main question that I have is that ? is this solution thread-safe
>> ? From what I understand of spring is that beans configured without
>> any additional qualifiers are inherently singletons. And when
>> deployed in a multi-theaded container like tomcat, Spring assumes
>> that the beans being severed up a thread-safe. So from I have read
>> is that KnowledeSessions are inherently not thread safe. So putting
>> the 2 together, I leaning towards the assessment that this above
>> solution is NOT thread safe and that if I do want it to be thread
>> safe I should set the StatefulKnowledgeSession to 'prototype' and
>> not leave it as a singleton.
>>
>> Please let me know if I'm missing anything in my assessment here !
>>
>> Thanks in advance,
>> Gurvinder
>>
>> This message is intended only for the individual or entity to which
>> it is addressed. It may contain privileged, confidential information
>> which is exempt from disclosure under applicable laws. If you are
>> not the intended recipient, please note that you are strictly
>> prohibited from disseminating or distributing this information
>> (other than to the intended recipient) or copying this information.
>> If you have received this communication in error, please notify us
>> immediately by e-mail or by telephone at the above number. Thank
>> you.
>> _______________________________________________
>> rules-users mailing list
>> rules-users at lists.jboss.org
>> https://lists.jboss.org/mailman/listinfo/rules-users
>>
>
>
>
>------------------------------
>
>Message: 6
>Date: Tue, 27 Nov 2012 08:28:47 -0800 (PST)
>From: Greg Barton <greg_barton at yahoo.com>
>Subject: Re: [rules-users] Inserting Different Objects Of Same Class !
>To: Rules Users List <rules-users at lists.jboss.org>
>Message-ID:
>       <1354033727.51269.YahooMailNeo at web184805.mail.gq1.yahoo.com>
>Content-Type: text/plain; charset="iso-8859-1"
>
>Are the values in the list ever tested? (With rules conditionally firing
>if the contents of a list changes.) ?In the rules you've provided so far
>they are not. ?If this is the case then there's no need to match them in
>the conditions and the use of globals is just fine. ?The only reason to
>match a list in the rule conditions is if changing the list could result
>in that rule firing.
>
>
>________________________________
> From: abhinay_agarwal <abhinay_agarwal at infosys.com>
>To: rules-users at lists.jboss.org
>Sent: Tuesday, November 27, 2012 4:36 AM
>Subject: Re: [rules-users] Inserting Different Objects Of Same Class !
>
>I was initially using two lists making them global, and it was working for
>me, but then i read
>
>"Globals are not designed to share data between rules and they should
>never
>be used for that purpose. Rules always reason and react to the working
>memory state, so if you want to pass data from rule to rule, assert the
>data
>as facts into the working memory."
>
>So, thought might be somewhere, an issue can arise and changed the global
>facts.
>
>Thanks,
>AA
>
>
>
>--
>View this message in context:
>http://drools.46999.n3.nabble.com/Inserting-Different-Objects-Of-Same-Clas
>s-tp4020971p4020981.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
>-------------- next part --------------
>An HTML attachment was scrubbed...
>URL:
>http://lists.jboss.org/pipermail/rules-users/attachments/20121127/3681c056
>/attachment-0001.html
>
>------------------------------
>
>_______________________________________________
>rules-users mailing list
>rules-users at lists.jboss.org
>https://lists.jboss.org/mailman/listinfo/rules-users
>
>
>End of rules-users Digest, Vol 72, Issue 55
>*******************************************




This message is intended only for the individual or entity to which it is addressed. It may contain privileged, confidential information which is exempt from disclosure under applicable laws. If you are not the intended recipient, please note that you are strictly prohibited from disseminating or distributing this information (other than to the intended recipient) or copying this information. If you have received this communication in error, please notify us immediately by e-mail or by telephone at the above number. Thank you.



More information about the rules-users mailing list