• Aucun résultat trouvé

Architecture of MQSC

The process of service composition can be usually characterized by four phases:

task decomposition phase, service search phase, service selection phase and service execution phase. Firstly, the task submitted by a customer can be decomposed into several subtasks, which can be accomplished by each single service. Secondly, it is necessary to search services and gain their information in order to map each subtask to all corresponding candidate services with the same function. Thirdly, a suitable service for each subtask needs be chosen to generate an optimal service executable plan in order to satisfy the customers end-to-end QoS constraints. Finally, a com-posite service is executed based on the optimal service executable plan. In order to accomplish the service composition life-cycle, MQSC is presented in this chapter.

MQSC not only provides a mechanism for the dynamic service composition but also can ensure the end-to-end QoS of the composite service by using a multi-agent system. Figure 3.6 shows the architecture of MQSC. According to the role played in service composition, agents in MQSC are divided into six classes: Portal Agent (PA), Decision Agent (DA), Search Agent (SA), Registry Agent (RA), Management Agent (MA) and Execution Agent (EA). They can work together in order to accom-plish a complex task.

3.4.1 Portal Agent

The Portal Agent is the interface to the customers and provides them with the ca-pability of the seamless access to a variety of complex services on the pervasive network. There is one single PA in the whole system, which provides customers with Web-based access. By adopting the Web browser as the Graphic User Interface (GUI), a customer can download the hypertext pages with Java Applets from the PA through HTTP and put forward the requirements (task) and the initial parameters.

Then the PA can automatically formalize the task submitted by the customer to gen-erate a Task Graph, in which each node represents a subtask, and then send the Task Graph to the Decision Agent. After the task is accomplished, the PA provides the results from the DA to the customer.

Portal Agent

Decision Agent

Search Agent

Register Depository

Registry Agent

Management Agent

Search Agent

Register Depository Registry

Agent

Service EA Service

EA

Service EA

Service EA

Fig. 3.6 Architecture of MQSC

3.4.2 Decision Agent

There is a single Decision Agent, which is a static intelligent agent. According to the ontology domains of services in the Task Graph submitted by the PA, the DA can dynamically create Search Agents and then send them to service register depository nodes to search the suitable services. After receiving the information on services from the SAs, the DA translates the Task Graph into the SCG and then executes the service selection algorithm depicted in Section 3.5.2 to automatically generate an optimal service executable plan, which satisfies end-to-end QoS constraints of the customer. Finally, the DA creates a Management Agent to implement the optimal service executable plan and sends the executable results to the PA.

3.4.3 Search Agent

A Search Agent is a mobile agent that is responsible for searching for services in service register depositories over the network. The length of its lifecycle is related to its search efficiency. In the normal situation, its life decays as time goes on. How-ever, if the SA keeps on finding new services, its life will increase. When the life

value decreases to 0, it will kill itself. SAs are dynamically created by the DA and only care about services related to them. For example, a SA focusing on books only cares about information on books and has no interest in restaurant reservations. Each SA belongs to one kind of the ontology domain and each ontology domain can also generate many SAs. Since a SA will kill itself when its life is over, the DA only needs to generate SAs and receive the messages from them.

3.4.4 Registry Agent

A Registry Agent resides in services register depository nodes. Its main function is to help the SA to find the optimal path in order to get more new services. A RA maintains a service routing table, which records the service ontology routings.

The items in the table include the desired service ontology, the next service register depository node address and the pheromone amount. After RA receives messages from SA, it will increase the pheromone amount on the corresponding routing item, which denotes that more new services can be found there. The routing table needs to be updated to decrease the pheromone amount regularly. These pheromones will fluctuate and eventually disappear as there is no increment, which indicates that the corresponding service may no longer exist or that there is no more demand for such a service.

3.4.5 Management Agent

The Management Agent is dynamically created by the DA and is responsible for implementing an optimal service executable plan. According to the optimal service executable plan, the MA can create an EA assembled with the SCG and the specified domain knowledge to implement the composite service. The MA can communicate with the EA by messages. When an EA access to a web service fails, the EA will send a message to the MA, and then the MA will dispatch a replicated EA to retry the prior EAs work so as to make the prior EA to continue its composition plan.

3.4.6 Execution Agent

The Execution Agent is a mobile agent created by the MA dynamically. Compared with the MA, the main function of the EA is to implement the composite service. So EAs behaviors are related with the process of the services. Four basic behaviors are important for the EA: cloning, messaging, service triggering and disposal. During the course of the composite service implementation, one component services output may be the other component services input. Under this condition, an EA can clone a

new EA to execute the following services. When an EA has finished its task, it will terminate its execution and die.