Introduction
Developing applications for distributed environments is notoriously difficult, often requiring developers to manage complex network locations, communication protocols, and cross-node security. This technical barrier frequently excludes domain experts, such as scientists or industrial engineers, from leveraging distributed computing power. Researchers at the University of Camerino developed Hermes, an agent-based middleware, to address this gap. Hermes employs a model-driven approach that separates the "what" (the logic of an activity) from the "how" (the movement of data and code), allowing users to design complex workflows graphically.
The Three-Layered Architecture
The Hermes architecture is structured into three distinct layers to abstract the complexities of distributed systems:
- User Layer: Users define workflows using graphical tools like the Java Workflow Editor (JaWE). These designs are exported in XML Process Definition Language (XPDL), a standard format for describing activity sequences.
- System Layer: This layer contains a context-aware compiler that processes XPDL workflows to generate UserAgents. These autonomous software entities are programmed to execute the specific goals defined in the user's workflow.
- Run-time Layer (Hermes Core): The engine running on each networked computer. It provides essential services including mobility (moving code and state), discovery (finding local services), communication between agents, and security.
Model-Driven Compilation
A core innovation of Hermes is its ability to transform a graphical diagram into a functional distributed system. This is achieved through a specialized compilation pipeline within the System Layer.
The compiler uses Java XML Binding for lexical and syntax analysis of the XPDL file. It then generates agent skeletons and uses the Apache Velocity Template Engine to produce Java code. Finally, the standard javac compiler produces the bytecode that runs on the Hermes middleware. This process effectively turns "drawing a diagram" into "programming a distributed system."
Security and Mobility
Hermes implements a "Guard" pattern for security. Mobile UserAgents cannot access local resources directly; instead, they must interact with a stationary ServiceAgent that acts as a gatekeeper. This architecture prevents unauthorized access and protects host systems from potentially malicious or buggy code.
The system utilizes "weak mobility." When an agent migrates, its code and current state are copied to a new location and restarted at a predefined point. This lightweight approach is reflected in the Hermes kernel, which is only approximately 120KB, allowing it to run on a wide range of hardware, from low-power factory microprocessors to high-end workstations.
Practical Application: Bioinformatics
The utility of Hermes was demonstrated through a Multiple BLAST Workflow. BLAST (Basic Local Alignment Search Tool) is essential for protein and DNA sequence analysis. In the demonstration, a user modeled a search that automatically:
- Split into three parallel tasks.
- Migrated to different database servers (e.g., PDB, SWISS-PROT, and DDBJ).
- Collected results and emailed a final report.
The paper also highlights the "McDuckAgent Demo," where a parent agent creates multiple "son" agents to perform parallel tasks, showcasing the system's capacity for dynamic agent coordination and autonomy.
Conclusion
Hermes successfully abstracts the complexities of distributed programming, enabling non-programmers to deploy autonomous mobile agents for complex tasks. While current limitations include the requirement for agents and services to be on the same platform to communicate, and the need to pre-implement "primitive" activities in Java, the system has already seen successful deployment in projects like SI.CO.M and LITBIO. Future work aims to integrate Hermes with GRID computing and more sophisticated biological simulations.
Summary updated