Managing agent pool and JVM agents

I need to manage an agent pool from my application. They are all written in Java, but agents must run in their own JVM. I wrote a proof of concept that runs subprocesses and uses stdout / stdin to send commands and save information. I also open a socket connection for data transfer.

I suggest that some pooling libraries should be able to help with agent management.

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

I could very well write what I need, but I am sure that other people have already done it better.

+3
source share
3 answers

For messaging, you can try something like ZeroMQ , it is a messaging tool and has local vehicles for communication between processes, then you can just serialize objects between the process.

An alternative is to return to traditionally rmi, perhaps the simplest.

+1
source
0
source

, , :

  • WebSockets. , , , . , . WebSockets .
  • Hazelcast. " " , ( jvm , ), ( , ) .. , , (, ZeroMQ btw), .. Hazelcast - , .

Actually, I started using vert.x to process websocket based messages and realized that he was using hazelcast himself.

0
source

Source: https://habr.com/ru/post/1755870/


All Articles