Presentation is loading. Please wait.

Presentation is loading. Please wait.

Mobile Agents Technology - Programming with Aglet

Similar presentations


Presentation on theme: "Mobile Agents Technology - Programming with Aglet"— Presentation transcript:

1 Mobile Agents Technology - Programming with Aglet
Felix T-L Lin KE TA IEEM, NTHU 2018/11/20

2 Reference D. B. Lange and M. Oshima, Programming and Deploying Java Mobile Agents with Aglets, Addison-Wesley, 1998 2018/11/20

3 Introduction – 1/2 Software agents Features
A software agent is one kind of computer software that executes a specific task Features Autonomous, goal-oriented, collaborative, flexible, adaptive, and mobile characteristics (Maamar, 2002) 2018/11/20

4 Introduction – 2/2 Mobile agents
It can be defined as a software agent that is able to migrate autonomously from one host to another in a computer network (Papaioannou and Edwards, 1999) 2018/11/20

5 Mobility – 1/3 Mobility is a special ability of a mobile agent
It means the agent is movable. It has the unique ability to transport itself from one system to another in a network Divide agents into 2 types (based on mobility) Stationary agent vs. mobile agent RPC vs. remote programming 2018/11/20

6 Mobility – 2/3 Remote Procedure Call Stationary agent
It always operates in a specific host It often involves multiple interactions to accomplish a given task Increase the network traffic The operation style is called Remote Procedure Call, RPC model(Dalmeijer, Hammer, and Aerts, 2000) 2018/11/20

7 Mobility – 3/3 Remote programming Mobile agent
It allows you to dispatch it to a remote host The interactions can take place locally Systems can be improved by reducing the flow of row data The operation style is called Remote Programming model (Walter, Rudigr, and Hartmut, 1998 ) 2018/11/20

8 Aglet Concept of Aglet Originated at IBM’s research laboratory in Japan A small application program or applet with the capability to serve as a mobile agent of services in a computer network Java objects can move from one host on the network to another Users can receive, manage and send aglets from Tahiti aglet server 2018/11/20

9 Tahiti Server 2018/11/20

10 Agent Transfer Network Sender Receiver Suspend Execution
Serialize Agent Encode Agent Transfer Agent Receiver Resume Execution Deserialize Agent Decode Agent Receive Agent 2018/11/20

11 Aglet Life-Cycle Model – 1/4
3 Context A Context B Dispatch Aglet Aglet Dispose 4 Clone 2 6 Retract 5 Create Deactivate Activate 1 Class File Disk Storage 2018/11/20

12 Aglet Life-Cycle Model – 2/4
Ex1: Aglet creation public class CreationExample extends Aglet { public void run() { try { getAgletContext().createAglet( getCodeBase(), “CreationChild”, null ); } catch (Exceptioin e) { System.out.println(e.getMessage()); } Public class CreationChild extends Aglet { public CreateChild() { … } public void onCreation(Object init) { … } public void run() { … } } createAglet() Aglet() onCreation() 2018/11/20 run()

13 Aglet Life-Cycle Model – 3/4
Ex2: Aglet dispatch run() Original host dispatch() onDispatching() onArrival() Destination host run() 2018/11/20

14 Aglet Life-Cycle Model – 4/4
public class DispatchingExample extends Aglet { boolean theRemote = false; public void onCreation(object init) { addMobilityListener( new MobilityAdapter() { public void onDispatching(MobilityEvent e) { //…… } public void onArrival(MobilityEvent e) { theRemote = true; ); public void run() { if(!theRemote) { try { URL destination = new URL( (String)getAgletContext(). getProperty(“location”) ); dispatch( destination ); } catch (Exception e) { System.out.println(e.getMessage()); } else { // The remote aglet runs here 2018/11/20

15 Aglet Event Model CloneListener Aglet MobilityListener
Clone Events CloneListener Mobility Events Aglet MobilityListener Persistence Events PersistencyListener 2018/11/20

16 Aglet Communication Model
Message Message Aglet/Application Proxy Aglet Reply Reply 2018/11/20

17 Agent Transfer Protocol, ATP
It is a simple application-level protocol modeled on HTTP. ATP is designed to transmit an agent of the agent system An ATP request consists a request line headers fields contents 2018/11/20

18 Application – 1/5 Background
A well-designed matching model can reduce the trading time and improve its efficiency A complex model for SIP trading The concept of matching model for SIP trading 2018/11/20

19 Application – 2/5 Scenario 2018/11/20

20 Application – 3/5 it is assumed that you setup m indices and membership functions for evaluating partners. Now, you want to evaluate the j th trading partner. The performance value of the j th trading partner can be defined as a formula means the i th index value of the j th trading object means the weight of the i th index 2018/11/20 means the membership function of the i th index

21 Application – 4/5 The collaboration of agents and the matching process
2018/11/20

22 Application – 5/5 Scenario assumption Buyers Sellers
Felix, Trappey, Umc, Sellers Dora, Joanne, Paul, The product is IEEE 1394a Device Controller 2018/11/20

23 ASDK Installation Copy the ASDK source to a folder
Setup the environment variables Add aglet_home (d:\Aglet1.1_\aglets1.1.0) Add jdk_home (d:\Aglet1.1_\jdk1.1.8) Set classpath (d:\Aglet1.1_\aglets1.1.0\lib;d:\Aglet1.1_\aglets1.1.0\public;) Set path (d:\Aglet1.1_\aglets1.1.0\bin;) 2018/11/20

24 Demonstration 2018/11/20

25 Demonstration Scenario assumption Buyers Sellers Broker, 140.114.53.57
Felix, Trappey, Umc, Sellers Dora, Joanne, Paul, Broker, The product is IEEE 1394a Device Controller 2018/11/20


Download ppt "Mobile Agents Technology - Programming with Aglet"

Similar presentations


Ads by Google