views:

43

answers:

2

I need to managed a pool of agents from my application. All are written in Java but the agents need to run in their own JVM. I wrote a proof of concept that starts the subprocesses and uses the stdout/stdin to send commands and keep-alive information. I also open a socket connection for data transfer.

I guess that some connection pooling libraries should be able to help in the management of the agents.

What about the communication between the agents and the main process ? Using TCP with XML messages (JAXB) is not really as reliable or convenient as I would like. Any suggestion for a better library to assist here ?

I could very well write what I need myself but I'm sure other people have done that way better already.

A: 

You could try Hessian:

http://hessian.caucho.com/

or Preon:

http://preon.sourceforge.net/

Jon
+1  A: 

For messaging could try something like ZeroMQ, it's a messaging tool and has local transports for communicationg between processes, then you could just serialised objects between the process.

The alternative is to go back to traditionally rmi, probably the simplest.

crafty
Also, a generic JMS or Tibco RV might be an option, depending on the environment (in many corporate environments these are already set up).
ddimitrov