GRASSHOPPER-a mobile agent platform mailto:

Slides:



Advertisements
Similar presentations
Message Passing Vs Distributed Objects
Advertisements

MicroKernel Pattern Presented by Sahibzada Sami ud din Kashif Khurshid.
Comparison Study of Three Mobile Agent Systems Aglets, Grasshopper and Voyager Qunhua Zhao, Hua Wang and Yi Zhang Department of Computer Science and Engineering.
Mobile Agents Mouse House Creative Technologies Mike OBrien.
1 Distribution of Data and Remote Invocation of Programs Tomasz Müldner, Zhonghai Luo and Elhadi Shakshuki* Jodrey School of Computer Science, Acadia University,
Executional Architecture
Copyright © 2001 Qusay H. Mahmoud RMI – Remote Method Invocation Introduction What is RMI? RMI System Architecture How does RMI work? Distributed Garbage.
Remote Method Invocation in Java Bennie Lewis EEL 6897.
Remote Method Invocation
Component Patterns – Architecture and Applications with EJB copyright © 2001, MATHEMA AG Component Patterns Architecture and Applications with EJB JavaForum.
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.
CS490T Advanced Tablet Platform Applications Network Programming Evolution.
Sockets  Defined as an “endpoint for communication.”  Concatenation of IP address + port.  Used for server-client communication.  Server waits for.
Copyright W. Howden1 Lecture 19: Intro to O/O Components.
Satzinger, Jackson, and Burd Object-Orieneted Analysis & Design
02/02/2004CSCI 315 Operating Systems Design1 Interprocesses Communication Notice: The slides for this lecture have been largely based on those accompanying.
Communication in Distributed Systems –Part 2
Client-Server Communication Sockets Remote Procedure Calls Remote Method Invocation (Java)
How Clients and Servers Work Together. Objectives Learn about the interaction of clients and servers Explore the features and functions of Web servers.
16: Distributed Systems1 DISTRIBUTED SYSTEM STRUCTURES NETWORK OPERATING SYSTEMS The users are aware of the physical structure of the network. Each site.
DISTRIBUTED PROCESS IMPLEMENTAION BHAVIN KANSARA.
Operating Systems Concepts 1. A Computer Model An operating system has to deal with the fact that a computer is made up of a CPU, random access memory.
FALL 2005CSI 4118 – UNIVERSITY OF OTTAWA1 Part 4 Web technologies: HTTP, CGI, PHP,Java applets)
Why Analysis Process Refer to earlier chapters Models what the system will do makes it easier for understanding no environment considered (hence, system.
Presented by Robert Zaremba.  Remote messages must be sent to a message queue so that components are decoupled  Both sides of a communication must be.
Silberschatz, Galvin and Gagne  2002 Modified for CSCI 399, Royden, Operating System Concepts Operating Systems Lecture 12 Communicating over.
Understanding the CORBA Model. What is CORBA?  The Common Object Request Broker Architecture (CORBA) allows distributed applications to interoperate.
Chapter 6 Operating System Support. This chapter describes how middleware is supported by the operating system facilities at the nodes of a distributed.
J2EE Structure & Definitions Catie Welsh CSE 432
Jozef Goetz, Application Layer PART VI Jozef Goetz, Position of application layer The application layer enables the user, whether human.
CS 390- Unix Programming Environment CS 390 Unix Programming Environment Topics to be covered: Distributed Computing Fundamentals.
Copyright © George Coulouris, Jean Dollimore, Tim Kindberg This material is made available for private study and for direct.
Spring/2002 Distributed Software Engineering C:\unocourses\4350\slides\DefiningThreads 1 RMI.
SCALABLE EVOLUTION OF HIGHLY AVAILABLE SYSTEMS BY ABHISHEK ASOKAN 8/6/2004.
Client Call Back Client Call Back is useful for multiple clients to keep up to date about changes on the server Example: One auction server and several.
Silberschatz, Galvin, and Gagne  1999 Applied Operating System Concepts Chapter 15: Distributed Communication Sockets Remote Procedure Calls (RPCs) Remote.
DISTRIBUTED SYSTEMS Principles and Paradigms Second Edition ANDREW S
RMI remote method invocation. Traditional network programming The client program sends data to the server in some intermediary format and the server has.
Transparent Mobility of Distributed Objects using.NET Cristóbal Costa, Nour Ali, Carlos Millan, Jose A. Carsí 4th International Conference in Central Europe.
Hwajung Lee.  Interprocess Communication (IPC) is at the heart of distributed computing.  Processes and Threads  Process is the execution of a program.
Middleware Services. Functions of Middleware Encapsulation Protection Concurrent processing Communication Scheduling.
CSE 341, S. Tanimoto Java brief review - 1 Java Brief Review Java’s strengths Object-oriented terminology Inheritance Interfaces An example with inheritance.
Chapter 5: Distributed objects and remote invocation Introduction Remote procedure call Events and notifications.
The Client-Server Model And the Socket API. Client-Server (1) The datagram service does not require cooperation between the peer applications but such.
1 Management of Distributed Data Tomasz Müldner, Elhadi Shakshuki*, Zhonghai Luo and Michael Powell Jodrey School of Computer Science, Acadia University,
Architecture View Models A model is a complete, simplified description of a system from a particular perspective or viewpoint. There is no single view.
CSI 3125, Preliminaries, page 1 SERVLET. CSI 3125, Preliminaries, page 2 SERVLET A servlet is a server-side software program, written in Java code, that.
What is Java? Object Oriented Programming Language Sun Microsystems “Write Once, Run Everywhere” Bytecode and Virtual Machine Java Platform (Java VM and.
Lecture 4 Mechanisms & Kernel for NOSs. Mechanisms for Network Operating Systems  Network operating systems provide three basic mechanisms that support.
Component Patterns – Architecture and Applications with EJB copyright © 2001, MATHEMA AG Component Patterns Architecture and Applications with EJB Markus.
G.v. Bochmann, revised Jan Comm Systems Arch 1 Different system architectures Object-oriented architecture (only objects, no particular structure)
Remote Method Invocation A Client Server Approach.
Multithreading The objectives of this chapter are: To understand the purpose of multithreading To describe Java's multithreading mechanism.
UMBC Distributed Computing with Objects RMI/Corba CMSC 432 Shon Vick.
Remote Method Invocation RMI architecture stubs and skeletons for remote services RMI server and client in Java Creating an RMI Application step-by- step.
Topic 5: CORBA RMI Dr. Ayman Srour
Distributed Computing & Embedded Systems Chapter 4: Remote Method Invocation Dr. Umair Ali Khan.
 This work confers an application which makes possible to use a Bluetooth enabled mobile phone to remote control home appliances such electric fan, LEDs.
Topic 4: Distributed Objects Dr. Ayman Srour Faculty of Applied Engineering and Urban Planning University of Palestine.
Client-Server Communication
WEB SERVICES From Chapter 19 of Distributed Systems Concepts and Design,4th Edition, By G. Coulouris, J. Dollimore and T. Kindberg Published by Addison.
MCA – 405 Elective –I (A) Java Programming & Technology
Knowledge Byte In this section, you will learn about:
Chapter 40 Remote Method Invocation
Objectives In this lesson you will learn about: Need for servlets
Chapter 46 Remote Method Invocation
Chapter 46 Remote Method Invocation
WEB SERVICES From Chapter 19, Distributed Systems
Java Remote Method Invocation
Presentation transcript:

GRASSHOPPER-a mobile agent platform mailto:

Installation requirements Classpath : C:\usr\local\grasshopper2.2.4\bin The location folder of the agent Classes in the Classpath Environment variable Path settings: C:\usr\local\grasshopper2.2.4\lib\gh.jar

AGENT From a static point of view, a Grasshopper agent is realized by means of a Java class or a set of classes. Each agent has exactly one agent class which characterizes the agent and which must be derived from one of the superclasses MobileAgent, StationaryAgent, PersistentMobileAgent, or PersistentStationaryAgent, all provided by the Grasshopper platform.

CONCEPTS de.ikv.grasshopper.agencyProvides all classes which represent the core agency of Grasshopper. de.ikv.grasshopper.agentProvides all classes which represent the services and agents within Grasshopper. de.ikv.grasshopper.communicationProvides all classes which represent the communication service of Grasshoppper. de.ikv.grasshopper.securityProvides all classes needed for security. de.ikv.grasshopper.typeProvides common information types used by agencies, agents, places and regions. de.ikv.grasshopper.utilProvides utility classes needed by the Grasshopper AgentSystem. de.ikv.webhopperde.ikv.grasshopper.agency de.ikv.grasshopper.agent de.ikv.grasshopper.communicationde.ikv.grasshopper.security de.ikv.grasshopper.type de.ikv.grasshopper.utilde.ikv.webhopper

CONCEPTS public abstract class Agent extends java.lang.Object implements IAgent, java.lang.RunnableIAgent The base class of all agents.

AGENT SUPPORT Grasshopper agent types Mobile agents: instances of classes that are derived from de.ikv.grasshopper.agent.MobileAgent Stationary agents: instances of classes that are derived from de.ikv.grasshopper.agent.StationaryAgent

GRASSHOPPER AGENTS Persistent mobile agents: instances of classes that are derived from de.ikv.grasshopper.agent.PersistentMobileAg ent.In contrast to usual mobile agents, persistent mobile agents are able to use the Grasshopper persistence service Persistent stationary agents: instances of classes that are derived from de.ikv.grasshopper.agent.PersistentStationary.

CONCEPTS A Grasshopper address covers the following components: protocol type: Type of the protocol to be used for the migration. The following protocols are supported: socket: plain socket protocol Rmi : Java Remote Method Invocation (RMI) protocol rmissl: Java Remote Method Invocation (RMI) protocol, protected via SSL. This protocol is only available if the security packages have been installed. (Please refer to the User’s Guide for more information.)

CONCEPTS. In this case, an agency domain service is required in order to determine the concrete address of the server side, including the real protocol type and port number. host name: Name or IP address of the destination host object name: Name of the destination agency, region registry, or external object port number: Number of the port at which the communication server of the destination agency is listening.

CONCEPTS place name: Name of the destination place. This component is optional. If no place name is specified, the agent migrates to the default place „InformationDesk“ which exists in every Grasshopper agency. complete address protocol://hostName:portNumber/agencyName/p laceName

CONCEPTS minimal address hostName/agencyName In this case, the agency domain service determines all communication servers of the specified destination agency, automatically selects one of them, and completes the address.

AGENT STATES

COPY SCENARIO

Copy Scenario Sometimes, it may be desirable for an agent to create a copy of itself and to order this copy to perform one specific task, while the original instance is occupied with another task. For this purpose, the agent’s superclass provides the method copy(...). By invoking this method, an agent creates another instance of its own agent class. The location in which the new instance is to be created has to be provided as parameter of the copy(...) method.

Copy Scenario The copy procedure is realized similar to an agent’s migration. That means the new agent instance is created at the desired location, and the data state of the original instance is transferred (in serialized form) to the new instance. Theimportant difference is that, in contrast to the migration, the original agent instance is not removed, but continues executing its task.

BOOMERANG AGENT

Boomerang Agent Description first mobile agent that makes use of its mobility and of its data state. After starting the agent, a small window appears, requesting a new destination address from the user. When pressing the OK button, the agent migrates to the specified location. After its arrival, the agent asks for the permission to migrate back to its home location. The different behavior of the agent, dependent on its current location, is realized by means of the agent’s data state that is represented in terms of a single integer variable named

STATES state: state = 0: This is the initial state, set in the agent’s init(...) method. In this state, the first execution block inside the live() method is performed. The agent asks for a new location, increments the state variable, and migrates. state = 1: In this state, the agent does not request the input of a new location, but just asks for the permission to migrate back to its home location. Before the agent travels home, state is set back to 0.

MIGRATION TYPES Two different kinds of migration can be separated: Strong migration; execution state Strong migration means that an agent migrates together with its whole execution state. An agent’s execution state contains all stack information that is required to characterize the point of execution that the agent has currently reached. After a strong migration, the agent continues processing its task exactly at the point at which it has been interrupted before the migration.

MIGRATION TYPES Weak migration; data state Weak migration means that an agent just maintains its data state when travelling from one location to another. An agent’s data state consists of internal variable values that are serialized at the agent’s old location, transferred across the network, and provided to the agent again at the new location. The agent programmer has to decide which variables are to be part of the data state.

GRASSHOPPER: Weak Migration Restrictions of Java The Java programming language does - by default - not offer the possibility to capture the execution state of a process or thread. The only possibility to achieve this is to modify the Java Virtual Machine. Since Grasshopper has to be executable on all JVMs that are compliant to the Java specifications of Sun Microsystems, Grasshopper agents use weak migration for travelling across the network.

AGENT REMOVAL The agent can remove itself by invoking the method remove() of its superclass Agent. The agent can be removed by external software entities via the API of the agency that is hosting the agent (method removeAgent(...) of the agency proxy IAgentSystem). functionality of agencies is explained. The agent can be removed by a user via the agency’s UI.

COMMUNICATION An agent that provides one method to the communication service. By means of this method, a (remote) client can order the ServerAgent to migrate to another location.

COMMUNICATION IServerAgent The server interface that contains the method which has to be accessible for client agents. This interface is the basis for the generation of server proxies. ServerAgent An agent that provides one method to the communication service. By means of this method, a (remote) client can order the ServerAgent to migrate to another location.

COMMUNICATION ClientAgent The agent that invokes the accessible method on the ServerAgent. In the context of this scenario, the ClientAgent remains at its initial location and in this way realizes a stationary user interface for the ServerAgent. By means of the ClientAgent’s GUI, a user can move the ServerAgent remotely from one agency to another

COMMUNICATION Two different server proxies have to be created by a client agent, depending on whether the client agent wants to communicate with the corresponding server agent in a synchronous or asynchronous way.

COMMUNICATION Synchronous communication means that, after invoking a method of a server agent via its proxy, the client agent is blocked until the invoked method returns. In contrast to this, an asynchronously invoked method does not block the invoking client.

COMMUNICATION The decision between synchronous and asynchronous communication is made when the client agent creates a server proxy by invoking the newInstance(...) method of the class: de.ikv.grasshopper.communication. ProxyGenerator. The default communication mode is synchronous communication.

Communication Modes Creation of a proxy for synchronous communication. This is the default mode, i.e., no specification of the communication mode is required: IServerAgent serverProxy =(IServerAgent) ProxyGenerator.newInstance(IServerAgent.class,ser verIdentifier); Creation of a proxy for synchronous communication with (optional) specification of the communication mode: IServerAgent serverProxy = (IServerAgent) ProxyGenerator.newInstance(IServerAgent.class,ser verIdentifier,ProxyGenerator.SYNC);

SYNC/ASYNC Synchronous communication means that, after invoking a method of a server agent via its proxy, the client agent is blocked until the invoked method returns. In contrast to this, an asynchronously invoked method does not block the invoking client.

GRASSHOPPER presentation END OF SLIDES