I've talked about thius several times recently, both on and off this
list. You could scout around on
http://www.mail-archive.com/[email protected] to see what details
you can find there.
Basically, the answer is that Java serialization is so, so, slow, that
bsave/bload, while intended to be faster than parsing rules and
loading facts, are in fact slower. The current situation is a
balancing act between the needs of the various people who had input
into the original implementation.
I'd like to completely redo the way bload/bsave work in Jess 6; we'll
see if I get around to it or not.
Regarding save-facts: if you want all the Facts in an engine as an
array of Fact objects, just use Rete.listFacts(). If you want them as
Strings, call toString() on the ones you get from listFacts().
I think ralph Deters wrote:
>
> hi,
>
> I need rete objects which are serializable, for cloning, moving across
> processes, backup etc. When serializing the rete objects the rules
> survive but the facts are lost. well I know that I should use
> save-facts/load-facts bsave/bload - but I wonder why the rete objects
> have transient members?
> at the moment I use the version 5.1.
>
> currently I subclass the rete class and added a method
> serialize/deserialize (which does the file handling for the rules.).
>
> is there a better way to achieve serializable rete objects - and why do
> rete objects contain transient members ?
> can I redirect the writing of the file (when using save-facts) into an
> array ?
>
> ralph
>
---------------------------------------------------------
Ernest Friedman-Hill
Distributed Systems Research Phone: (925) 294-2154
Sandia National Labs FAX: (925) 294-2234
Org. 8920, MS 9012 [EMAIL PROTECTED]
PO Box 969 http://herzberg.ca.sandia.gov
Livermore, CA 94550
---------------------------------------------------------------------
To unsubscribe, send the words 'unsubscribe jess-users [EMAIL PROTECTED]'
in the BODY of a message to [EMAIL PROTECTED], NOT to the
list (use your own address!) List problems? Notify [EMAIL PROTECTED]
---------------------------------------------------------------------