I'm doing a little project in Java with mobile agents that jumps from
computer to computer in a network to search for data. I have tested Jess
a bit and found out that it would be very nice to use it as the "brain"
for the agent. I.e. to decide when and where to move and what to do
(what
methods to run) when it gets there. Enough of backgound.
The agent transport system uses the Serializable interface to pack the
objects before sending them over the network. Therefore I was pleased to
see that all the Jess classes seems to be serializable.
I have tried my agent system before including Jess and then everything
worked just fine. Compileing the agent with the Rete engine and some
small things (like some asserts) also worked fine. The agent could start
at my computer, create the Rete engine, move to some other computer and
then do some assertions and get back here.
But then I discovered the problem. The facts that I inserted were no
longer available and had disappered! Either they weren't moved with the
Agent, Rete object etc. or the Rete engine was resetted or cleared in
some way when it reached the destination.
I also tried it a bit more by including a rule that would be fired on
one of the facts that were included on the other computer. The line was
(r is the Rete object):
r.executeCommand("(defrule test (back again)
=> (assert (rule activated)))");
But then I got a long exception and the top of it are as follows:
Fri Apr 14 11:28:57 CEST 2000=>TCPDistributor : ERROR : Caught exception
handling a client
request: java.lang.ArrayStoreExceptionnull
java.lang.ArrayStoreException
at java.io.ObjectInputStream.inputArray(Compiled Code)
at java.io.ObjectInputStream.readObject(Compiled Code)
at java.io.ObjectInputStream.defaultReadObject(Compiled Code)
at java.io.ObjectInputStream.inputObject(Compiled Code)
at java.io.ObjectInputStream.readObject(Compiled Code)
at java.io.ObjectInputStream.inputArray(Compiled Code)
at java.io.ObjectInputStream.readObject(Compiled Code)
at java.io.ObjectInputStream.defaultReadObject(Compiled Code)
at java.io.ObjectInputStream.inputObject(Compiled Code)
at java.io.ObjectInputStream.readObject(Compiled Code)
at java.io.ObjectInputStream.defaultReadObject(Compiled Code)
at java.io.ObjectInputStream.inputObject(Compiled Code)
at java.io.ObjectInputStream.readObject(Compiled Code)
at java.io.ObjectInputStream.inputArray(Compiled Code)
at java.io.ObjectInputStream.readObject(Compiled Code)
at java.io.ObjectInputStream.defaultReadObject(Compiled Code)
at jess.Node.readObject(Node.java:138)
What I can read from this is that the agent transport system gets a
problem when moving one of the Node objects and that one of its Arrays
are null and then everything breaks. (I think that other Nodes are moved
correctly, so it's not a general transport problem).
Does anyone have any suggestions about what to do? Is it even possible
to move the entire Jess engine? Maybe if I somehow stores all the data
from the
engine and then move the data over in an new object and then creates a
new engine and fills it with the data? But it feels like to much work
since it *almost* works this way!
I think it would be really useful to have an mobile agent controlled by
a
rule based system like Jess!
I hope someone can please help me. If more details are required for you
to be able to help me, just ask and I answer. I just thought that the
mail was long enough already.
Best regards
Andreas Johansson, Sweden
---------------------------------------------------------------------
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]
---------------------------------------------------------------------