Mobile Agent System with Inter-Agent Communication and Spawning
🔗View on GitHubDistributed Java mobile agent framework supporting migration, inter-agent messaging, and dynamic agent spawning across multiple servers.
Overview
Developed a Java-based mobile agent system enabling agents to migrate across 5+ servers using JSCH (SSH2). Implemented inter-agent communication via shared ConcurrentHashMap message queues and supported agent spawning for parallel distributed tasks. The system demonstrates scalable, autonomous agent behavior with synchronized multithreading and shared state coordination.
System Architecture
Mobile Agent Framework: Agent class extends Serializable for migration. PlaceManager runs on each host providing local execution environment via reflection. AgentMigrationService uses JSCH for secure SSH-based agent transportation. Agents communicate through a distributed ConcurrentHashMap (shared state) accessible via SSH tunnels or Hazelcast. Parent agents spawn child agents using dynamic class loading and thread pooling. Synchronized message queues ensure FIFO ordering. Service registry (Zookeeper-like) tracks active agents. Fault tolerance via checkpoint-restore and dead letter queues.
Setup & Implementation
Configured multiple remote hosts accessible via SSH for agent deployment. Each agent runs on a server, communicates through a shared message map, and can spawn child agents to perform subtasks concurrently. Used JSCH for secure migration and synchronized threads for reliable coordination and execution.