# A Multi-Agent Architecture for Data Analysis
## 2 ActoDeS Overview  
ActoDeS (Actor Development System) is a software framework for the development of concurrent and distributed systems [2; 3], implemented by using the Java language and experimented in different application domains (see, for example, [4; 5; 6]). This software framework takes advantage of concurrent objects (hereafter named actors) derived from the actor model [7], and of pre-existent Java software libraries and solutions for supporting concurrency and distribution. The development of a standalone or distributed application consists in (_i_) the definition of the behaviors assumed by its actors and (_ii_) the configuration of a few parameters. Through appropriate configuration, it is possible to select the most appropriate implementation of the actors and of the other runtime components of the application. In fact, the possibility of using different implementations of the actors and of the other runtime components can guarantee some execution attributes of an application (e.g., performance, reliability, and scalability). Moreover, the deployment of an application on a distributed architecture is simplified because an actor can move to another computational node and can transparently communicate with remote actors. In ActoDeS, an application is defined by a set of actors that interact by exchanging asynchronous messages. Actors can send messages only to known actors, i.e., actors of which they know the addresses. There are three ways for an actor to know the address of another actor: (_i_) It receives a message from the other actor; (_ii_) it receives a message whose content contains the address of the other actor; and finally (_iii_) it creates the other actor. After their creation, actors can change their behaviors several times, until they kill themselves. Each behavior has the main duty of processing the incoming messages that match certain message patterns. Therefore, if an unexpected message arrives, the actor maintains it in its mailbox until a behavior will be able to process it, or a behavior kills the actor. The processing of the incoming messages is performed through message handlers. In response to a message, an actor uses the associated handler for: (_i_) Sending other messages; (_ii_) creating new actors; (_iii_) changing its local state or its behavior; (_iv_) setting a timeout within receiving a new message; and finally (_v_) killing itself. In particular, when a timeout fires, the actor automatically sends a timeout message to itself and the corresponding message handler is executed. In ActoDeS, addresses, messages, and message patterns are all instances of Java classes. An actor address is represented by a reference object that acts as both a system-wide unique identifier and a local and remote proxy of an actor. A message is an object that contains a set of fields, maintaining the typical header information and the message content. Finally, a message pattern is an object defined as a combination of constraints on the value of some message fields. Depending on the complexity of the application and on the availability of computing and communication resources, a system can be distributed on one or more actor spaces. Each actor space corresponds to a Java Virtual Machine and so a system distributed on some actor spaces can be deployed on one or more computational nodes. An actor space acts as \"container\" for a set of actors and provides them the necessary services for their execution. Figure 1 shows the structure of an actor space. Figure 1: The actor space structure. In particular, an actor space performs its tasks through three main runtime components (i.e., controller, dispatcher and registry) and through two runtime actors (i.e., the executor and the service provider). The controller is a runtime component that has the duty to manage the activities of an actor space. It configures and starts the runtime components and the actors of the application and manages its activities until the end of its execution.