Home page zone

WADE

WADE (Workflows and Agents Development Environment) is a domain independent platform built on top of JADE. As depicted in Figure 1, JADE provides a distributed runtime environment, the agent and behaviour (a task performed by an agent) abstractions, peer to peer communication between agents and basic agent lifecycle management and discovery mechanisms. WADE adds to JADE the support for the execution of tasks defined according to the workflow metaphor and a number of mechanisms that help managing the complexity of the distribution both in terms of administration and fault management.
Workflows and managed distribution are actually the two key elements of the platform and readers should primarily consider them when deciding if and how WADE can fulfil their needs.
In principle WADE supports “notepad-programming” in the sense that there is no hidden stuff that developers can’t control. However, especially considering that one of the main advantages of the workflow approach is the possibility of representing processes in a friendly graphical form, WADE comes with a development environment called WOLF that facilitates the creation of WADE-based application. WOLF is an Eclipse plug-in and, as a consequence, allows WADE developers to exploit the full power of the Eclipse IDE plus additional WADE-specific features.


Figure 1. The WADE platform

1.1 Workflow based development

A workflow is a formal definition of a process in terms of activities to be executed, relations between them, criteria that specify the activation and termination and additional information such as the participants, the software tools to be invoked, required inputs and expected outputs and internal data manipulated during the execution.

1.1.1 Advantages

The key aspect of the workflow metaphor is the fact that the execution steps as well as their sequencing are made explicit. This makes it possible to give a graphical representation of a process defined as a workflow. Such representation is clearly extremely more intuitive with respect to a piece of software code and in general is understandable by domain experts as well as by programmers. Domain experts can therefore validate system logics directly and not only on documents that most of the time are not perfectly up to date. In some cases they could even contribute to the actual development of the system without the need for any programming skill.
Another important characteristic is that, being the execution steps explicitly identified, the workflow engine (i.e. a system able to automatically execute a process defined as a workflow) can trace them. This makes it possible to create automatic mechanisms to facilitate system monitoring and problem investigation. Additionally, when processes have to be executed within the scope of a transaction, semi-automatic rollback procedures can be activated in case of unexpected fault.
Finally, since workflows are fully self-documented, workflow-based development releases the development team of the burden of keeping documentation aligned each time design choices must be revisited to face implementation details or evolving requirements.

1.1.2 Scope

If on the one hand the workflow metaphor has a number of advantages as discussed in previous section, it is in general not suitable to deal with low level operations such as data management and transformation, mathematical computations and so on. Software code is typically more powerful and efficient to implement them. As a consequence, nowadays the workflow metaphor is mostly used in BPM environments where a workflow represents a business process and orchestrates a number of existing systems typically (but not necessarily) accessible by means of Web Services-based interfaces.
The main challenge in WADE is to bring the workflow approach from the business process level to the level of system internal logics. That is, even if it can be used for that purpose too, WADE does not primarily target high level orchestration of services provided by different systems, but the implementation of the internal behaviour of each single system.
A direct consequence of the described approach is that WADE is expected to be particularly suitable for applications that imply the execution of possibly long and fairly complex tasks. On the other hand, when dealing with systems that mainly retrieve/transform/store data from/to a data repository following user requests/inputs (as for instance all classical Web applications) usage of state of the art middleware technologies such as J2EE application servers are likely more indicated.

1.1.3 Approach

First of all it should be noticed that WADE does not include a single powerful workflow engine as the majority of BPM oriented tools. On the contrary WADE provides an extension of the basic Agent class of the JADE library called WorkflowEngineAgent that embeds a small and lightweight workflow engine (we talk about "micro-workflow engine"). As a consequence, besides normal JADE behaviours, all Workflow-Engine agents active in a WADE-based multi-agent applications are able to execute workflows represented according to a WADE specific formalism.
The second important point to highlight is that, in order to allow developers to exploit the workflow metaphor to define system internal logics and at the same time to give them the same power of a software programming language and a comparable execution efficiency, the WADE workflow representation formalism is based on the Java language. That is, a workflow that can be executed by WADE Workflow-Engine agents is expressed as a Java class with a well defined structure (see the WADE User Guide for details). As such WADE workflows can be edited, refactored, debugged and in general managed as all Java classes and can include all pieces of code (methods, fields of whatever types, inner classes, references to external classes and so on) needed to implement the process details. In addition, of course, the execution flow they specify can be presented and modified in a friendly, graphical way. More in details WOLF (the development environment for WADE based applications) is an Eclipse plugin and allows developers to work with a graphical view (suitable to manage the process flow) and a code view (the usual Eclipse Java editor suitable to define execution details) that are kept in synch.
Therefore the WADE workflow engine embedded into WorkflowEngineAgents is not an interpreter of a workflow description language, but just executes compiled Java code. This on the one hand makes it extremely performant, but on the other hand requires the necessary workflow classes to be available when a Workflow-Engine agent is requested to execute a workflow. For this reason WADE uses ad hoc Java class loaders to allow deploying new/modified workflows that become immediately executable without the need to turn the system down.
Another important characteristic of WADE workflows is that they can be extended. That is, it is possible to create new workflows by extending existing ones and just defining the differences.
Finally it must be noticed that WADE does not impose that all system logics are expressed using the workflow metaphor. Developers are free to exploit the workflow metaphor to describe those tasks for which they think it is appropriate and use normal JADE behaviours (or other purely Java patterns) elsewhere.

1.2 Managing the complexity of the distribution

WADE inherits from JADE a distributed runtime composted of several “Containers” that can run on different hosts and can contain each one a number of agents. Even if this is not strictly mandatory, most of the time a container corresponds to a JVM. The set of active containers is called a Platform. As depicted in Figure 2 a special container exists in the platform called “Main Container”. The Main Container must be the first one to start and all other containers (typically called peripheral containers) register to it at bootstrap time. Furthermore the Main Container holds two special agents.
The AMS (Agent Management System) that represents the authority in the platform, i.e. it is the only agent that can activate platform management actions such as creating/killing other agents, killing containers and shutting down the platform. Normal agents wishing to perform such actions must request them to the AMS.
The DF (Directory Facilitator) that implements the yellow pages service by means of which agents can advertise their services and find other agents offering services they need.


Figure 2. JADE distributed architecture

Distribution is often considered a useful characteristic, especially for applications that are expected to support heavy loads, since a distributed application can be deployed on highly scalable hardware architectures such as blades. It is clear however that administering a distributed application is more complex than administering a monolithic application unless proper tools are made available. Furthermore the probability that a host crashes increases proportionally with the number of hosts the application is distributed on and proper recovery mechanisms are necessary to ensure the application can survive. Clustering systems are often used for those purposes, but they are typically quite expensive and difficult to configure.
WADE faces these problems by providing a number of mechanisms that help the administrator in
• Configuring (tuning parameters) the application.
• Activating/deactivating the application spreading components (i.e. containers and agents) across available hosts according to specific needs.
• Monitoring runtime events and critical conditions such as disk and memory consumption.
• Deploying new/modified system logics at runtime without system down.
• Automatically recovering from host, container and agent faults.

Refer to the WADE User Guide for more details


The WADE license and the Open Source Community

"Open source does not just mean access to the source code" - O’Reilly
WADE is Open Source Software since May 2008 (version 1.0) and it is released under the LGPL license.
The LGPL license keeps all contributors to the same level relative to each other and it respects and protects both the users and the authors. In the following you can have a fast and rough idea of rights and duties of this license but, please, refer to the official LICENSE file for more details and legally precise information.
In particular LGPL assures right to:

• make and distribute copies of WADE
• have access to the software’s source code
• make improvements to the program
• incorporate WADE into a proprietary program
• continue the WADE experience even if we stopped it !! (which will not happen, because we will not stop WADE so easily)

The LGPL mandates also some duties, and in particular:

• to not keep modifications private
• not change the license of WADE and its modifications