[rules-users] Failing serialisation of large rule base

Michal Bali michalbali at gmail.com
Sun Jul 12 10:25:53 EDT 2009


Hi Jen,

To answer your 3. point. You can create a serializable marshaller like this:

MarshallerFactory.newSerializeMarshallingStrategy( acceptor );

You can find complete examples here:
http://anonsvn.jboss.org/repos/labs/labs/jbossrules/trunk/drools-compiler/src/test/java/org/drools/integrationtests/MarshallingTest.java

Best regards,
Michal


On Sat, Jul 11, 2009 at 11:55 PM, LadyCode <j_whittlesea at hotmail.com> wrote:

>
> Hi,
>
> I have written a Java application that reads in approximately 6000 .dslr
> rules at runtime. This takes around 6minutes, however I have installed the
> application on the target (rather old!) machine and load time is in excess
> of 20minutes. I have been trying without success to find a way to speed up
> loading:
>
> I have tried:
>
> 1. Serialising the KnowledgePackages themselves. This works well but has
> limited effect on load time.
> 2. Serialising the KnowledgeBase, this does not seem to work on large rule
> bases and fails with StackOverflowException when I load more than about 200
> rules.
> 3. Serialising the StatefulKnowledgeSession using
>
> Marshaller marshaller = MarshallerFactory.newMarshaller(knowledgeBase);
> marshaller.marshall(out, session);
>
> This works well for the life of the marshaller but does not solve my
> problem
> as I need to restart the application and therefore cannot use the same
> instance of marshaller later on. Marshaller is not serialisable.
>
> I know some of these points are discussed in other posts. But is there
> anything I can do or have I missed the point?
>
> Any help or comments very much appreciated,
>
> Regards,
> Jen
> --
> View this message in context:
> http://www.nabble.com/Failing-serialisation-of-large-rule-base-tp24444231p24444231.html
> Sent from the drools - user 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/20090712/f62019a9/attachment.html 


More information about the rules-users mailing list