Software Agent Computing Agent Mobility. Agent mobility is the ability for an agent program to migrate or to make a copy (clone) itself across one or.

Slides:



Advertisements
Similar presentations
웹 서비스 개요.
Advertisements

FIPA Interaction Protocol. Request Interaction Protocol Summary –Request Interaction Protocol allows one agent to request another to perform some action.
MODELLING OF MOBILE AGENT SYSTEMS USING dynPLA APPROACH Agnė Paulauskaitė-Tarasevičienė Henrikas Pranevičius 1.
SELBO Agent Ivan Minov University of Plovdiv “Paisii Hilendarski“
CORBA Architecture Nitin Prabhu. Outline CORBA Object Model CORBA Architecture Static Invocation Dynamic Invocation CORBA Communication Model.
28.2 Functionality Application Software Provides Applications supply the high-level services that user access, and determine how users perceive the capabilities.
1 Introduction to XML. XML eXtensible implies that users define tag content Markup implies it is a coded document Language implies it is a metalanguage.
Adding Organizations and Roles as Primitives to the JADE Framework NORMAS’08 Normative Multi Agent Systems, Matteo Baldoni 1, Valerio Genovese 1, Roberto.
GRASSHOPPER-a mobile agent platform mailto:
Inheritance and Class Hierarchies Chapter 3. Chapter 3: Inheritance and Class Hierarchies2 Chapter Objectives To understand inheritance and how it facilitates.
Remote Method Invocation Chin-Chih Chang. Java Remote Object Invocation In Java, the object is serialized before being passed as a parameter to an RMI.
Tutorials 2 A programmer can use two approaches when designing a distributed application. Describe what are they? Communication-Oriented Design Begin with.
JADE Java Agent Development Framework An Overview.
Modelling classes Drawing a Class Diagram. Class diagram First pick the classes –Choose relevant nouns, which have attributes and operations. Find the.
.NET Mobile Application Development Remote Procedure Call.
Multi-Agent System for Online Auctions Jose Manuel Valladares Pernas CIS Master Project - Fall 2004 Advisor: Dr. Haiping Xu.
DISTRIBUTED PROCESS IMPLEMENTAION BHAVIN KANSARA.
Java Agent Development Environment (JADE) Jade is a platform for running agents; it supports: –An asynchronous agent programming model –Communication between.
Introduction to Java Appendix A. Appendix A: Introduction to Java2 Chapter Objectives To understand the essentials of object-oriented programming in Java.
Computer Networks  Network - A system of computers interconnected in order to share information.  Data transmission - consists of sending and receiving.
UML Collaboration Diagram. Recap System Sequence Diagrams (SSD) UML for SSD Examples.
SSC2: Web Services. Web Services Web Services offer interoperability using the web Web Services provide information on the operations they can perform.
XHTML Introductory1 Linking and Publishing Basic Web Pages Chapter 3.
Java Language and SW Dev’t
Chapter 8 Script-free pages. Problem with scripting in JSP When you use scripting (declaration, scriplet, expressions) in your JSP, you actually put Java.
JavaScript: Functions © by Pearson Education, Inc. All Rights Reserved.
Spoken dialog for e-learning supported by domain ontologies Dario Bianchi, Monica Mordonini and Agostino Poggi Dipartimento di Ingegneria dell’Informazione.
James Holladay, Mario Sweeney, Vu Tran. Web Services Presentation Web Services Theory James Holladay Tools – Visual Studio Vu Tran Tools – Net Beans Mario.
Web Server Administration Web Services XML SOAP. Overview What are web services and what do they do? What is XML? What is SOAP? How are they all connected?
Architecting Web Services Unit – II – PART - III.
Computer Programming 2 Lab(1) I.Fatimah Alzahrani.
RMI remote method invocation. Traditional network programming The client program sends data to the server in some intermediary format and the server has.
10-Nov-15 Java Object Oriented Programming What is it?
Transparent Mobility of Distributed Objects using.NET Cristóbal Costa, Nour Ali, Carlos Millan, Jose A. Carsí 4th International Conference in Central Europe.
Distribution and components. 2 What is the problem? Enterprise computing is Large scale & complex: It supports large scale and complex organisations Spanning.
Sensor Web – TITAN Research 4/24/2017
CORBA Common Object Request Broker Architecture. Basic Architecture A distributed objects architecture. Logically, an object client makes method calls.
Supporting FIPA Interoperability for Legacy Multi-Agent Systems Christos Georgousopoulos 1 Omer F. Rana 1 ( ) 2.
1 Web Servers (Chapter 21 – Pages( ) Outline 21.1 Introduction 21.2 HTTP Request Types 21.3 System Architecture.
The Client-Server Model And the Socket API. Client-Server (1) The datagram service does not require cooperation between the peer applications but such.
12 Chapter 12: Advanced Topics in Object-Oriented Design Systems Analysis and Design in a Changing World, 3 rd Edition.
FIPA Abstract Architecture London FIPA meeting January 24-29, 2000 from: TC-A members.
Agent Overview. Topics Agent and its characteristics Architectures Agent Management.
Lecture 4 Mechanisms & Kernel for NOSs. Mechanisms for Network Operating Systems  Network operating systems provide three basic mechanisms that support.
Intro to Web Services Dr. John P. Abraham UTPA. What are Web Services? Applications execute across multiple computers on a network.  The machine on which.
Inheritance and Class Hierarchies Chapter 3. Chapter 3: Inheritance and Class Hierarchies2 Chapter Objectives To understand inheritance and how it facilitates.
Inheritance and Class Hierarchies Chapter 3. Chapter Objectives  To understand inheritance and how it facilitates code reuse  To understand how Java.
.NET Mobile Application Development XML Web Services.
EEL 5937 Content languages EEL 5937 Multi Agent Systems Lecture 10, Feb. 6, 2003 Lotzi Bölöni.
Copyright © 2004, Keith D Swenson, All Rights Reserved. OASIS Asynchronous Service Access Protocol (ASAP) Tutorial Overview, OASIS ASAP TC May 4, 2004.
Third International Workshop on Networked Appliance 2001 SONA: Applying Mobile Agent to Networked Appliance Control S.Aoki, S.Makino, T.Okoshi J.Nakazawa.
MTA SZTAKI Department of Distributed Systems Hogyan mixeljünk össze webszolgáltatásokat, ontológiákat és ágenseket? Micsik András.
Distributed Computing & Embedded Systems Chapter 4: Remote Method Invocation Dr. Umair Ali Khan.
JADE Java Agent Development Environment Yunus Emre ÇAKMAZ Ahmet Cahit YAŞA 1.
Real-Time Systems Laboratory Seolyoung, Jeong JADE (Java Agent DEvelopment framework )
Servlets.
Web Programming Developing Web Applications including Servlets, and Web Services using NetBeans 6.5 with GlassFish.V3.
Distribution and components
Lecture 20 – April 2, 2002 Bond Objects.
Multi-agent system for web services
Chapter 3: Windows7 Part 4.
Lecture 3 From process-oriented to agent-oriented programming.
Lecture 4: RPC Remote Procedure Call Coulouris et al: Chapter 5
Chapter 40 Remote Method Invocation
Lecture 4: RPC Remote Procedure Call CDK: Chapter 5
Chapter 46 Remote Method Invocation
Chapter 46 Remote Method Invocation
WEB SERVICES From Chapter 19, Distributed Systems
Java Programming Language
PASSI (Process for Agent Societies Specification and Implementation)
Presentation transcript:

Software Agent Computing Agent Mobility

Agent mobility is the ability for an agent program to migrate or to make a copy (clone) itself across one or multiple network hosts Support for mobility in JADE consists of a set of API classes and methods that allow an agent to perform the required actions by itself or via the AMS, and a mobility specific ontology, MobilityOntology, contained in the package jade.domain.mobility.  Agent class in the package jade.core contains methods: doMove(), beforeMove(), afterMove(), doClone(), beforeClone() afterClone(). To move an agent, you just need to call the method doMove(Location)‏ public void doMove(Location destination)‏ Planning mobility – roadmap Moving Cloning doMove is called either by the Agent Platform or by the agent itself to start a migration process doMove() just changes the agent state to AP_TRANSIT. The actual migration take place asynchronously.

Mobility in JADE: intra and inter  Intra-platform mobility is that, mobile agent can navigate across different agent containers but it is confined to a single JADE platform  Inter-platform mobility provides agent with navigating among Agent Platforms  FIPA defines extensions that are necessary to the AMS to support mobility.  JADE containers are not FIPA compliant (FIPA does not specify them)‏  “It should be noted that the concept of an AP does not mean that all agents resident on an AP have to be co-located on the same host computer.”*  Therefore FIPA does not specify intra-platform migration  JADE supports intra-platform migration by adaptation of inter- platform migration specification  JADE does not support inter-platform mobility, but Migration Add- On does:

Mobility in JADE – weak or strong? “not-so-weak mobility”  Status: an agent have to wait before currently scheduled behaviour finishes its cycle JADE agents can migrate in the middle of a conversation and a programmer can exploit the behaviour composition capability in order to define an arbitrarily fine-grained sequence of states in which an agent is allowed to migrate move to a remote container (possibly on a different host)‏ restart its execution there from the exact point where it was interrupted  Code: If the code of the moving agent is not available on the destination container it is automatically retrieved on demand An agent must be Serializable in order to be able to move Mobility can be  self-initiated through doMove() of the Agent class  forced by the AMS (following a request from another agent)‏ Agent cloning is also available - method doClone()‏

The tricky point - Location You cannot create a Location object by yourself Ask AMS – by sending it a REQUEST with content  WhereIsAgentAction – allows to obtain with the location of a given agent; parameter - the identifier of the agent that your are querying the location – via method setAgentIdentifier(AID)‏ or  QueryPlatformLocationsAction - allows to obtain all available locations within a given platform. It takes no parameter)‏ package jade.domain.JADEAgentManagement

Agent Management Reference Model Agent Management System – AMS:  Mandatory component of Agent Platform  Exerts supervisory control over use of the AP  Only one in a single AP  Maintains of a directory AID  Offers white pages services to other agent  Each agent must register with an AMS in order to get a valid AID number Message Transport System

AMS as White Pages Services Scenario 1 1. Agent A asks AMS about all possible containers in the AP 2. Agent A receives set of locations from AMS 3. Agent A migrate to the randomly chosen location Scenario 2 1. Agent A asks AMS about location of the agent B 2. Agent A receives the response from AMS about location 3. Agent A migrate to the location of agent B Let’s talk about ontology

Documentation:  JADE Tutorial Application-defined Content Languages and Ontologies,  API documentation (javadoc): jade.content package and subpackage  Sample code: examples.content package in the examples included in the JADE distribution Semantic of communication in JADE Setting content SetContent()‏ SetContentObject()‏ fillContent()‏ Content type Strings Java Objects Ontology Getting content getContent()‏ getContentObject()‏ ObjectsextractContent()‏

Agent Communication A  B Inside the ACL message, Info is represented as a content expression consistent with a proper content language (e.g. SL) and encoded in a proper format (e.g. string). Both A and B have their own (possibly different) way of internally representing Info. Example: there is a person whose name is John and who is 35 years old  (Person :name John :age 35)‏ Info class Person { String name; int age; public String getName() {return name; } public void setName(String n) {name = n; } public int getAge() {return age; } public void setAge(int a) {age = a; } …. }

A needs to convert his internal representation of Into the corresponding ACL content expression representation and B needs to perform the opposite conversion. B should also perform a number of semantic checks to verify that Info is a meaningful piece of information, i.e. that it complies with the rules (for instance that the age of John Is actually an integer value) of the ontology by means of which both A and B ascribe a proper meaning to Info Handling Content Expression A B

Main Elements of Communication content manager object of the ContentManager class included in the jade.content package received through the getContentManager() method content manager delegates the conversion and check operations to an ontology (i.e. an instance of the Ontology class included in the jade.content.onto package) and a content language codec (i.e. an instance of the Codec interface included in the jade.content.lang package)‏

REQUEST :sender (agent-identifier :name :receiver (set (agent-identifier :name :content (( action (agent-identifier :name (where-is-agent (agent-identifier :name ))‏ :language FIPA-SL0 :ontology JADE-Agent-Management :protocol fipa-request )‏ Denotes the ontology which is used to give a meaning to the symbols in the content expression. An ontology gives meanings to symbols and expressions within a given domain language. Denotes the encoding scheme of the content of the action. Brings representation of message, e.g FIPA SL or it subsets (SLO, SL1). Content represents the domain dependent component of the communication. Define semantical structure of message content.

(REQUEST... :content ((“action” (ActorOfAction)‏ (ActionName (ActionParameters))‏ ))‏... )‏ (REQUEST :sender (agent-identifier :name :receiver (set (agent-identifier :name :content (( action (agent-identifier :name (where-is-agent (agent-identifier :name ))‏ :language FIPA-SL0 :ontology JADE-Agent-Management :protocol fipa-request Summary: The sender requests the receiver to perform some action Message content: An action description Description: The action can be any action the receiver is capable of performing: pick up a box, book a plane flight, change a password etc. An important use of the request act is to build composite conversations between agents, where the actions that are the object of the request act are themselves communicative acts such as inform

(INFORM.. :content ((“result” (“action” (ActorOfAction)‏ (ActionName (ActionParameters))‏ )‏ (ResultOfAction)‏ ))‏... )‏ (INFORM :sender (agent-identifier :name :receiver (set (agent-identifier :name :content ((result (action (agent-identifier :name (where-is-agent (agent-identifier :name )‏ (set (location :name Container-1 :protocol JADE-IPMT :address Zadig:1099/JADE.Container-1 ))‏ :reply-with :language FIPA-SL0 :ontology JADE-Agent-Management :protocol fipa-request

Registering language and ontology instance 1. Registering the defined ontology and the selected content language to the agent // register the SL0 content language getContentManager().registerLanguage(new SLCodec(), FIPANames.ContentLanguage.FIPA_SL0); 1. Creating and handling content expression as Java objects that are instances of the classes developed in step 2 and let JADE translate these Java objects to/from strings or sequences of bytes that fit the content slot of ACLMessages // register the mobility ontology getContentManager().registerOntology(MobilityOntology.getInstance());

Creating request to AMS private ACLMessage prepareRequestToAMS(AID agent) { ACLMessage request = new ACLMessage(ACLMessage.REQUEST); request.addReceiver(getAMS()); request.setLanguage(FIPANames.ContentLanguage.FIPA_SL0); request.setOntology(MobilityOntology.NAME); request.setProtocol(FIPANames.InteractionProtocol.FIPA_REQUEST); // creates the content of the ACLMessage Action act = new Action(); act.setActor(getAMS()); WhereIsAgentAction action = new WhereIsAgentAction(); action.setAgentIdentifier(agent); act.setAction(action); try { getContentManager().fillContent(request, act); } catch (CodecException ignore) { } catch (OntologyException ignore) {} return request; } public class WhereIsAgentAction implements AgentAction { private AID agentName; public WhereIsAgentAction() {} public void setAgentIdentifier(AID id) { agentName = id; } public AID getAgentIdentifier() { return agentName; } (REQUEST :sender (agent-identifier :name :receiver (set (agent-identifier :name :content (( action (agent-identifier :name (where-is-agent (agent-identifier :name ))‏ :language FIPA-SL0 :ontology JADE-Agent-Management :protocol fipa-request)‏

Parsing answer from AMS (INFORM :sender (agent-identifier :name :receiver (set (agent-identifier :name :content ((result (action (agent-identifier :name (where-is-agent (agent-identifier :name )‏ (set (location :name Container-1 :protocol JADE-IPMT :address Zadig:1099/JADE.Container-1 ))‏ :reply-with :language FIPA-SL0 :ontology JADE-Agent-Management :protocol fipa-request )‏ private Location parseAMSResponse(ACLMessage response) { Result results = null; try { results = (Result)getContentManager()‏.extractContent(response); } catch (UngroundedException e) { } catch (CodecException e) { } catch (OntologyException e) {} Iterator it = results.getItems().iterator(); Location loc = null; if (it.hasNext()) loc = (Location) it.next(); return loc; }

Mobility Example 6 Documentation:  Chapter 3.7 in the Programmers guide included in the JADE distribution provides a detailed explanation of the mobility support  API documentation (javadoc): jade.core.Agent class, jade.core.Location interface and jade.domain.mobility package  Sample code: examples.mobile package in the examples included in the JADE distribution.  In FIPA Agent Management Support for Mobility Specificationhttp:// x.html