TIB JINI. INTRODUCTION Here we look at only one type(web,object,file). Clear separation between...

100
TIB JINI

Transcript of TIB JINI. INTRODUCTION Here we look at only one type(web,object,file). Clear separation between...

Page 1: TIB JINI. INTRODUCTION Here we look at only one type(web,object,file). Clear separation between computation and coordination exists. A distributed system.

TIBJINI

Page 2: TIB JINI. INTRODUCTION Here we look at only one type(web,object,file). Clear separation between computation and coordination exists. A distributed system.

INTRODUCTIONHere we look at only one

type(web,object,file).

Clear separation between computation and coordination exists.

A distributed system is a collection of processes.

Page 3: TIB JINI. INTRODUCTION Here we look at only one type(web,object,file). Clear separation between computation and coordination exists. A distributed system.

INTRODUCTIONEach process is concerned with a specific

computational activity.

which in principle is carried out independently from other activities of other processes.

Page 4: TIB JINI. INTRODUCTION Here we look at only one type(web,object,file). Clear separation between computation and coordination exists. A distributed system.

INTRODUCTION

We are trying to separate computation from coordination.

The coordination part of distributed system handles the communication and cooperation between the processes.

Page 5: TIB JINI. INTRODUCTION Here we look at only one type(web,object,file). Clear separation between computation and coordination exists. A distributed system.

TYPES

Page 6: TIB JINI. INTRODUCTION Here we look at only one type(web,object,file). Clear separation between computation and coordination exists. A distributed system.

INTRODUCTIONReferential coupling generally appears in the

form of explicit referencing in communication.

Sender is in need to know the identifier of receiver.Ex: A process can communicate only if it

knows the name or identifier of the other process.

Page 7: TIB JINI. INTRODUCTION Here we look at only one type(web,object,file). Clear separation between computation and coordination exists. A distributed system.

INTRODUCTIONTemporal coupling means that processes that

are communicating will both have to be up and running.

Sender and Receiver needs to be active and are running.

Page 8: TIB JINI. INTRODUCTION Here we look at only one type(web,object,file). Clear separation between computation and coordination exists. A distributed system.

COORDINATION MODELSTIBJINI

Page 9: TIB JINI. INTRODUCTION Here we look at only one type(web,object,file). Clear separation between computation and coordination exists. A distributed system.

TIBCoordination model: Meeting Oriented Model

Makes use of subject based addressing, leading to what is known as publish/subscribe architecture.

Receiving a message on subject X is possible only if the receiver had subscribed to it.

Publishing a message on subject X means that the message is sent to all subscriber to X.

Page 10: TIB JINI. INTRODUCTION Here we look at only one type(web,object,file). Clear separation between computation and coordination exists. A distributed system.

TIB Architecture

Page 11: TIB JINI. INTRODUCTION Here we look at only one type(web,object,file). Clear separation between computation and coordination exists. A distributed system.

ArchitectureTIB uses multicasting to forward messages

to subscribers.

To cross-large scale networks, it effectively builds an overlay network with proprietary multicast routers.

Page 12: TIB JINI. INTRODUCTION Here we look at only one type(web,object,file). Clear separation between computation and coordination exists. A distributed system.

WAN Architecture

Page 13: TIB JINI. INTRODUCTION Here we look at only one type(web,object,file). Clear separation between computation and coordination exists. A distributed system.

CommunicationEvents : Publish – subscribe systems are

ideally supported by means of events: you are notified when someone publishes a message that is of interest to you.

Listener Events: Local object that registers a call back for a specific subject.

Page 14: TIB JINI. INTRODUCTION Here we look at only one type(web,object,file). Clear separation between computation and coordination exists. A distributed system.

Communication

Page 15: TIB JINI. INTRODUCTION Here we look at only one type(web,object,file). Clear separation between computation and coordination exists. A distributed system.

CommunicationEvent Scheduling: Events for the same

listener event are handled one after the other.

They may also be lost/ignored if listener event is destroyed at the wrong time

Page 16: TIB JINI. INTRODUCTION Here we look at only one type(web,object,file). Clear separation between computation and coordination exists. A distributed system.

Communication

Page 17: TIB JINI. INTRODUCTION Here we look at only one type(web,object,file). Clear separation between computation and coordination exists. A distributed system.

NAMINGNames are important as they form address of

the address of the message.

Filtering facilities ensure that right messages reach right subscribers.

Page 18: TIB JINI. INTRODUCTION Here we look at only one type(web,object,file). Clear separation between computation and coordination exists. A distributed system.

NAMING

Page 19: TIB JINI. INTRODUCTION Here we look at only one type(web,object,file). Clear separation between computation and coordination exists. A distributed system.

NAMING

Page 20: TIB JINI. INTRODUCTION Here we look at only one type(web,object,file). Clear separation between computation and coordination exists. A distributed system.

Transactional MessagingEnsures that the messages sent by a single

process are delivered only if the sender commits.

Store published messages until commit time and only then make them available to subscribers.

Page 21: TIB JINI. INTRODUCTION Here we look at only one type(web,object,file). Clear separation between computation and coordination exists. A distributed system.

Transactional Messaging

Page 22: TIB JINI. INTRODUCTION Here we look at only one type(web,object,file). Clear separation between computation and coordination exists. A distributed system.

Fault Tolerance: MulticastingTIB relies on multicasting for publishing

messages to all subscribers.

This mechanism needs to be extended to wide area networks and requires reliable multicasting.

How?

Page 23: TIB JINI. INTRODUCTION Here we look at only one type(web,object,file). Clear separation between computation and coordination exists. A distributed system.

Fault Tolerance: MulticastingSolution:Pragmatic General Multicast(PGM)A NACK based scheme in which receiver tells

the sender that they are missing something

Page 24: TIB JINI. INTRODUCTION Here we look at only one type(web,object,file). Clear separation between computation and coordination exists. A distributed system.

Fault Tolerance: Multicasting

Page 25: TIB JINI. INTRODUCTION Here we look at only one type(web,object,file). Clear separation between computation and coordination exists. A distributed system.

SECURITYGoal: establish a secure channel between a

publisher and a subscriberReferential decoupling between publisher and

subscriber is lost

Sender publishes encrypted data including its identity

Page 26: TIB JINI. INTRODUCTION Here we look at only one type(web,object,file). Clear separation between computation and coordination exists. A distributed system.

SECURITYEach subscriber sets up a secure channel

with the sender

All subscribers share the same key to decrypt messages

Page 27: TIB JINI. INTRODUCTION Here we look at only one type(web,object,file). Clear separation between computation and coordination exists. A distributed system.

SECURITYDiffie-Helman key exchange + public-key

cryptography

Assume Alice and Bob already:obtained certificates containing each-other

public keyestablished a shared key KA,B using Diffie-

Helman

Page 28: TIB JINI. INTRODUCTION Here we look at only one type(web,object,file). Clear separation between computation and coordination exists. A distributed system.

SECURITYEstablish a secure channel between a specific

publisher and specific subscriber.

Page 29: TIB JINI. INTRODUCTION Here we look at only one type(web,object,file). Clear separation between computation and coordination exists. A distributed system.

TIB-SUMMARY

ArchitectureCommunicationNamingTransactional MessagingFault ToleranceSecurity

Page 30: TIB JINI. INTRODUCTION Here we look at only one type(web,object,file). Clear separation between computation and coordination exists. A distributed system.

JINIGenerative Communication Model.Temporal and Referential uncoupling by

means of javaspaces, a tuple based storage system.

Tuple?A Tuple is typed set of references to objects.

Page 31: TIB JINI. INTRODUCTION Here we look at only one type(web,object,file). Clear separation between computation and coordination exists. A distributed system.

JINITuples are stored in serialized, that is,

marshalled from into javaspace.

To read a tuple, construct a template, with some fields left open.

Match a template against a tuple through a field by field comparision.

Page 32: TIB JINI. INTRODUCTION Here we look at only one type(web,object,file). Clear separation between computation and coordination exists. A distributed system.

JINIwrite(): create an object copy and store it in

JavaSpace

read(): return tuples from JavaSpace that match a template

take(): like read, but removes tuple from JavaSpace

Page 33: TIB JINI. INTRODUCTION Here we look at only one type(web,object,file). Clear separation between computation and coordination exists. A distributed system.

JINI

Page 34: TIB JINI. INTRODUCTION Here we look at only one type(web,object,file). Clear separation between computation and coordination exists. A distributed system.

JINIWrite : A copy of tuple is stored in javaspace.Read : A template is compared to tuple

instances; the first match returns a tuple instance.

Take : A template is compared to tuple instances; the first match returns a tuple instance and removes the matching instance from javaspace.

Page 35: TIB JINI. INTRODUCTION Here we look at only one type(web,object,file). Clear separation between computation and coordination exists. A distributed system.

public class Message implements Entry {public String content;public Message() { }

}

Message msg = new Message();Msg.content = “Hello World”;JavaSpace space = SpaceAccessor.getSpace();Space.write(msg, null, Lease.FOREVER);

Write entry

JavaSpaceEntry

Page 36: TIB JINI. INTRODUCTION Here we look at only one type(web,object,file). Clear separation between computation and coordination exists. A distributed system.

Example: JavaSpace “Hello World” Use pattern matching to get desired objects

from the space“null” value represent wildcardA message object with the “content” field set

to “null” will return any message objectA message object with the content field set to

“Berkeley” will only return a message object with the content set to that value

Page 37: TIB JINI. INTRODUCTION Here we look at only one type(web,object,file). Clear separation between computation and coordination exists. A distributed system.

Message template = new Message(); //Content is nullMessage result = (Message)space.read(

template, null, Long.MAX_VALUE);System.out.println(result.content);

“Hello World”

JavaSpace

Read entry

Entry

Long.MAX_VALUE - timeout parameter

Page 38: TIB JINI. INTRODUCTION Here we look at only one type(web,object,file). Clear separation between computation and coordination exists. A distributed system.

Communication : NotificationsA Process can register itself at an object to

be notified when ever the event happens.

Uses a callback mechanism through listener objects.

A callback is implemented as an RMI.

Page 39: TIB JINI. INTRODUCTION Here we look at only one type(web,object,file). Clear separation between computation and coordination exists. A distributed system.

Layered Architecture of Jini

Page 40: TIB JINI. INTRODUCTION Here we look at only one type(web,object,file). Clear separation between computation and coordination exists. A distributed system.

EventsA client can register with an object that has

events of interest

A client can tell object to pass event to another process

Notification implemented by remote call

Page 41: TIB JINI. INTRODUCTION Here we look at only one type(web,object,file). Clear separation between computation and coordination exists. A distributed system.

Using Events with JavaSpaces

Page 42: TIB JINI. INTRODUCTION Here we look at only one type(web,object,file). Clear separation between computation and coordination exists. A distributed system.

JavaSpace ImplementationReplicate JavaSpace at all machines

Store tuples locally, search everywhere

Partial replication and searchingUse DHTs?

Page 43: TIB JINI. INTRODUCTION Here we look at only one type(web,object,file). Clear separation between computation and coordination exists. A distributed system.

Replicate Everywhere

Page 44: TIB JINI. INTRODUCTION Here we look at only one type(web,object,file). Clear separation between computation and coordination exists. A distributed system.

Search Everywhere

Page 45: TIB JINI. INTRODUCTION Here we look at only one type(web,object,file). Clear separation between computation and coordination exists. A distributed system.

Partial Replication and Searching

Page 46: TIB JINI. INTRODUCTION Here we look at only one type(web,object,file). Clear separation between computation and coordination exists. A distributed system.

Lookup ServiceCan be implemented using JavaSpaces

Each service inserts a tuple describing itselfJavaSpace notifies interested clients when

service becomes available Instead, Jini provides a specialized lookup

serviceA service registers itself using (attribute, value)-

pairsE.g., service parameters, location

Page 47: TIB JINI. INTRODUCTION Here we look at only one type(web,object,file). Clear separation between computation and coordination exists. A distributed system.

Service ItemField Description

ServiceID The identifier of the service associated with this item

Service A (possibly remote) reference to the object implementing the service

AttributeSets A set of tuples describing the service

Tuple Type Attributes

ServiceInfo Name, manufacturer, vendor, version, model, serial number

Location Floor, room, building

Address Street, organization, organizational unit, locality, state or province, postal code, country

Predefined tuples:

Page 48: TIB JINI. INTRODUCTION Here we look at only one type(web,object,file). Clear separation between computation and coordination exists. A distributed system.

TransactionsAim to provide ACID properties

Atomicity: all operations of a transaction take place, or none of them do

Consistency: completion of a transaction must leave the participants in a ``consistent'' state

Isolation: activities of one transaction must not affect any other transactions

Durability: results of a transaction must be persistent

Page 49: TIB JINI. INTRODUCTION Here we look at only one type(web,object,file). Clear separation between computation and coordination exists. A distributed system.

TransactionsJini

Supply the mechanism of two-phase commit protocol

Leave the policy to the participants in a transaction

Page 50: TIB JINI. INTRODUCTION Here we look at only one type(web,object,file). Clear separation between computation and coordination exists. A distributed system.

TransactionsA transaction is represented by a long identifier, obtained from a transaction manager

Each transaction is associated a lease; if lease expires, transaction is aborted

Page 51: TIB JINI. INTRODUCTION Here we look at only one type(web,object,file). Clear separation between computation and coordination exists. A distributed system.

JINI-SUMMARYTransactions

Page 52: TIB JINI. INTRODUCTION Here we look at only one type(web,object,file). Clear separation between computation and coordination exists. A distributed system.

COMPARISION OF TIB & JINI

Page 53: TIB JINI. INTRODUCTION Here we look at only one type(web,object,file). Clear separation between computation and coordination exists. A distributed system.

SOFTWARE AGENTWhy Agent?

To simplify distributed computing.

Page 54: TIB JINI. INTRODUCTION Here we look at only one type(web,object,file). Clear separation between computation and coordination exists. A distributed system.

SOFTWARE AGENTSAGENT?

Agents can be defined to be autonomous problem solving computational entities capable of effective operation in dynamic and open environments.

Page 55: TIB JINI. INTRODUCTION Here we look at only one type(web,object,file). Clear separation between computation and coordination exists. A distributed system.

SOFTWARE AGENTS

Page 56: TIB JINI. INTRODUCTION Here we look at only one type(web,object,file). Clear separation between computation and coordination exists. A distributed system.

SOFTWARE AGENTSwe identify seven types of agents:

Collaborative agents Interface agents Mobile agents Information/Internet agents Reactive agents Hybrid agents Smart Agents

Page 57: TIB JINI. INTRODUCTION Here we look at only one type(web,object,file). Clear separation between computation and coordination exists. A distributed system.

Panoramic Classification

Page 58: TIB JINI. INTRODUCTION Here we look at only one type(web,object,file). Clear separation between computation and coordination exists. A distributed system.

Characteristics of AgentsAutonomous.Adaptive and proactive.Mobile – ability to migrate to a remote

system, perform the tasks and return the results.

Persistent.Goal OrientedCommunicative, Collaborative, Cooperative.Flexible.

Page 59: TIB JINI. INTRODUCTION Here we look at only one type(web,object,file). Clear separation between computation and coordination exists. A distributed system.

Agent Vs ObjectObject

Are defined as computational entities that encapsulate some state, are able to perform actions, or methods on this state, and communicate by message passing. Are computational entities. Encapsulate some internal state. Are able to perform actions, or methods, to change

this state. Communicate by message passing.

Page 60: TIB JINI. INTRODUCTION Here we look at only one type(web,object,file). Clear separation between computation and coordination exists. A distributed system.

Agent Vs ObjectDifferences between agent and object

An object can be thought of as exhibiting autonomy over its state: it has control over it. But an object does not exhibit control over it’s behavior.

Other objects invoke their public method. Agent can only request other agents to perform actions.

“Objects do it for free, agents do it for money.”(implement agents using object-oriented

technology)……Thinking it.Thinking it.

Page 61: TIB JINI. INTRODUCTION Here we look at only one type(web,object,file). Clear separation between computation and coordination exists. A distributed system.

Agent Vs ObjectIn standard object model has nothing

whatsoever to say about how to build systems that integrate reactive, pro-active, social behavior.

Each has their own thread of control. In the standard object model, there is a single thread of control in the system.

(agent is similar with an active object.)Summary,

Agent embody stronger notion of autonomy than object

Agent are capable of flexible behavior Multi-agent system is inherently multi-threaded

Page 62: TIB JINI. INTRODUCTION Here we look at only one type(web,object,file). Clear separation between computation and coordination exists. A distributed system.

AGENT TECHNOLOGYThe computing landscape moves from the

focus on individual stand alone computers to distributed, open and dynamic systems where the real power of computers is used.

Page 63: TIB JINI. INTRODUCTION Here we look at only one type(web,object,file). Clear separation between computation and coordination exists. A distributed system.

Requirements to Build AgentAn agent must have its own unique

identity An agent host must

allow multiple agents to co-exist and execute simultaneously.

allow agents to communicate with each other and the agent host.

be able to negotiate the exchange of agents.

Page 64: TIB JINI. INTRODUCTION Here we look at only one type(web,object,file). Clear separation between computation and coordination exists. A distributed system.

Requirements to Build Agentbe able to freeze an executing agent and transfer

it to another host.be able to thaw an agent transferred from

another and allow it to resume execution. prevent agents from directly interfering with

each other Agents must be able to determine what

other agents are executing in the agent host Agents must be able to send and receive

messages to/from other agents.

Page 65: TIB JINI. INTRODUCTION Here we look at only one type(web,object,file). Clear separation between computation and coordination exists. A distributed system.

Agent Architecture

Page 66: TIB JINI. INTRODUCTION Here we look at only one type(web,object,file). Clear separation between computation and coordination exists. A distributed system.

TerminologyAgentHost: It keeps track of all the agents

executing in the system. It will interact with other AgentHosts to transfer an agent from one system to the other.

Agent: The Agent class defines the agent. An instance of this class exists for each agent executing on a given agent host.

 

Page 67: TIB JINI. INTRODUCTION Here we look at only one type(web,object,file). Clear separation between computation and coordination exists. A distributed system.

TerminologyAgentInterface: An instance of this class

envelopes an agent and provides access to it via a well-defined interface. It is also the primary conduit for communication between agents. An AgentInterface instance is the only handle an agent gets to the other agents executing on a given host.

AgentIdentity: An instance of this class uniquely identifies an agent. Agents use this information to identify the agents with whom they are interested in collaborating.

Page 68: TIB JINI. INTRODUCTION Here we look at only one type(web,object,file). Clear separation between computation and coordination exists. A distributed system.

AGENT TECHNOLOGYThe characteristics of dynamic and open

environments in which For example

Heterogenous systems must interact,span organisational boundaries, and operate effectively within rapidly changing circumstances and with dramatically increasing quantities of available information, suggests that there exists a need for new computing model.

Page 69: TIB JINI. INTRODUCTION Here we look at only one type(web,object,file). Clear separation between computation and coordination exists. A distributed system.

AGENT TECHNOLOGYIn particular there is a need for autonomy,

i.e., to enable components to respond dynamically to changing circumstances while trying to achieve over arching objectives.

Which results in agent based computing.

Page 70: TIB JINI. INTRODUCTION Here we look at only one type(web,object,file). Clear separation between computation and coordination exists. A distributed system.

AGENT TECHNOLOGYThe two agent languages are:

KQML(Knowledge Query and Manipulation Language)

FIPA (Foundation for Intelligent Physical Agents)

Page 71: TIB JINI. INTRODUCTION Here we look at only one type(web,object,file). Clear separation between computation and coordination exists. A distributed system.

AGENT TECHNOLOGYKQML was developed in the early 1990’s as a

part of US govt. ARPA knowledge sharing project.

FIPA was much standardised by Europe.

Both deal with agent-to-agent communication

Page 72: TIB JINI. INTRODUCTION Here we look at only one type(web,object,file). Clear separation between computation and coordination exists. A distributed system.

AGENT TECHNOLOGYThe power of agent technology depends on

inter-agent communication.Powerful agents need to communicate with

UsersSystem Resources

Page 73: TIB JINI. INTRODUCTION Here we look at only one type(web,object,file). Clear separation between computation and coordination exists. A distributed system.

Benefits of AgentsReduce human work.Handle information overload.Provide automated help to the vast hordes of untrained

users.Provide a new, more powerful methodology to develop

complex software systems.Asynchronous / autonomous task execution.Reduction of network traffic by transferring the agents to

remote places to carry out a task rather than having to remotely monitor the task execution.

Negotiation capabilities.Learning capabilities – Proactive.

Page 74: TIB JINI. INTRODUCTION Here we look at only one type(web,object,file). Clear separation between computation and coordination exists. A distributed system.

Drawbacks of AgentsLack of global standard for agent technology.All existing agent platforms provide basic

capabilities and agents designed on one platform may not be compatible with others.

Security issues such as masquerading, denial of service persists.

Page 75: TIB JINI. INTRODUCTION Here we look at only one type(web,object,file). Clear separation between computation and coordination exists. A distributed system.

Agent ApplicatonsUser Interface Agents

Microsoft Office Assistant.Business process Agents

Data-driven workflow management.Information Management Agents

Email filtering agents.Web browsing assistantNotification agents.Resource Discovery agents.

 

Page 76: TIB JINI. INTRODUCTION Here we look at only one type(web,object,file). Clear separation between computation and coordination exists. A distributed system.

Agent PlatformsTelescript (General Magic).Aglets Workbench (IBM).Concordia (Mitsubishi).JADE (Java Agent Development Framework,

Sun Microsystems).Grasshopper (IKV++).Odyssey (General Magic).Voyager (Object Space).

Page 77: TIB JINI. INTRODUCTION Here we look at only one type(web,object,file). Clear separation between computation and coordination exists. A distributed system.

MOBILE AGENTSoftware programMoves from machine to machine under its

own control….Suspend execution at any point in time,

transport itself to a new machine and resume execution

Once created, a mobile agent autonomously decides which locations to visit and what instructions to perform

Continuous interaction with the agent’s originating source is not required

Page 78: TIB JINI. INTRODUCTION Here we look at only one type(web,object,file). Clear separation between computation and coordination exists. A distributed system.

MOBILE AGENTMobile Code – transfers codeMobile Object – transfers code + dataMobile Process – transfers

code + data + thread stateMobile Agent – transfers

code + data + thread + authority of its owner

Page 79: TIB JINI. INTRODUCTION Here we look at only one type(web,object,file). Clear separation between computation and coordination exists. A distributed system.

RPC Vs Mobile Agents

• Remote Procedure Calls (RPC)– One computer calls procedures on another– Messages: Requests and Responses– Procedure is “remote” – i.e. it is local to the

machine that performs it– Client and Server agree in advance on the

protocol for communication– Continuous on-going interaction and

communication between the client and server

CLIENT SERVERnetwork

Page 80: TIB JINI. INTRODUCTION Here we look at only one type(web,object,file). Clear separation between computation and coordination exists. A distributed system.

RPC Vs Mobile Agents • Mobile Agents

– Instead of calling a procedure, supply the procedure as well

– Messages: Mobile Agent ( procedure + data + state)

– “Sending” computer may have begun the procedure and the receiving computer will continue the procedure

– On-going interaction, but NO on-going communication

CLIENT

SERVER

network

Mobile

AgentService

Page 81: TIB JINI. INTRODUCTION Here we look at only one type(web,object,file). Clear separation between computation and coordination exists. A distributed system.

Applets, Servlets and Mobile Agents

• Applet – Downloaded from server to client

• Servlet – Uploaded from client to server

• Mobile Agents – Detached from client, can have multiple hops

Page 82: TIB JINI. INTRODUCTION Here we look at only one type(web,object,file). Clear separation between computation and coordination exists. A distributed system.

MOBILE AGENTSMobile agents are computational software

processes capable of roaming wide area networks (WANs) such as the WWW.

interacting with foreign hosts gathering information on behalf of its owner coming “back home” having performed the

duties set by its user

Page 83: TIB JINI. INTRODUCTION Here we look at only one type(web,object,file). Clear separation between computation and coordination exists. A distributed system.

MOBILE AGENTSThese duties may range from a flight

reservation to managing a telecommunications network

NOTE:mobility is neither a necessary nor sufficient

condition for agenthood

Page 84: TIB JINI. INTRODUCTION Here we look at only one type(web,object,file). Clear separation between computation and coordination exists. A distributed system.

MOBILE AGENTSMobile agents are agents because they are

autonomous and they cooperate, albeit differently to collaborative agents

Page 85: TIB JINI. INTRODUCTION Here we look at only one type(web,object,file). Clear separation between computation and coordination exists. A distributed system.

MOBILE AGENTSFor example they may cooperate or communicate by one

agent making the location of some of its internal objects and methods known to other agents.

By doing this, an agent exchanges data or information with other agents without necessarily giving all its information away.

Page 86: TIB JINI. INTRODUCTION Here we look at only one type(web,object,file). Clear separation between computation and coordination exists. A distributed system.

MOBILE AGENTSThe key hypothesis underlying mobile agents

is that agents need not be stationary; indeed, the idea is that there are significant benefits to be accrued, in certain applications, by eschewing static agents in favour of their mobile counterparts

Page 87: TIB JINI. INTRODUCTION Here we look at only one type(web,object,file). Clear separation between computation and coordination exists. A distributed system.

MOBILE AGENTSThese benefits are largely non-functional, i.e.

we could do without mobile agents, and only have static ones but the costs of such a move are high

Page 88: TIB JINI. INTRODUCTION Here we look at only one type(web,object,file). Clear separation between computation and coordination exists. A distributed system.

MOBILE AGENTSFor example, consider the scenario borrowed from Wayner

(1995b) where the user is required to write a program that would allow her home computer make a flight reservation for her by accessing several airline reservation databases. She lists all her preferences: non-smoking, departure between 7 and 9.30 am from Baltimore, arrival at Austin before noon, no more than one connection, and no changes at Chicago OíHare. A static single-agent program would need to request for all flights leaving between these times from all the databases, which may total more than 200 and take up many kilobytes. It would also require a list of all the connections and proceed to narrow down the search. Each of these actions involves sifting through plenty of extraneous information which could/would clog up the network. Besides, she is probably paying for this network time

Page 89: TIB JINI. INTRODUCTION Here we look at only one type(web,object,file). Clear separation between computation and coordination exists. A distributed system.

MOBILE AGENTSConsider the alternative. She encapsulates, object-

oriented style, her entire program within an agent which consumes probably less than 2K which roams the network of airline reservation systems, arrive safely and queries these databases locally, and returns ultimately to her home computer, with a schedule which she may confirm or refute. This alternative obviates the high communications costs of shifting, possibly, kilobytes of information to her local computer - which presumably she cannot cope with. Hence, mobile agents provide a number of practical, though non-functional, advantages which escape their static counterparts. So their motivation include the following anticipated benefit.

Page 90: TIB JINI. INTRODUCTION Here we look at only one type(web,object,file). Clear separation between computation and coordination exists. A distributed system.

How Mobile Agents Work: A Brief Telescript View Telescript is an interpreted object-oriented

and remote programming language which allows for the development of distributed applications

Page 91: TIB JINI. INTRODUCTION Here we look at only one type(web,object,file). Clear separation between computation and coordination exists. A distributed system.

How Mobile Agents Work:The interpreter and runtime development

environment for the Telescript language is called the Telescript engine and a given host can support simultaneously multiple Telescript engines

Page 92: TIB JINI. INTRODUCTION Here we look at only one type(web,object,file). Clear separation between computation and coordination exists. A distributed system.

How Mobile Agents Work:

Page 93: TIB JINI. INTRODUCTION Here we look at only one type(web,object,file). Clear separation between computation and coordination exists. A distributed system.

How Mobile Agents Work:It shows just one of these Telescript engines

integrated onto an operating system via a programming interface called the Telescript application programmer interface (API

Page 94: TIB JINI. INTRODUCTION Here we look at only one type(web,object,file). Clear separation between computation and coordination exists. A distributed system.

How Mobile Agents Work:Telescript applications consist of Telescript

agents operating within a ëworldí or cyberspace of places, engines, clouds and regions. All of these are objects

Page 95: TIB JINI. INTRODUCTION Here we look at only one type(web,object,file). Clear separation between computation and coordination exists. A distributed system.

How Mobile Agents Work:For example, a place is an instance of some

class within the engine whose definition inherits operations which can be called on that place

Page 96: TIB JINI. INTRODUCTION Here we look at only one type(web,object,file). Clear separation between computation and coordination exists. A distributed system.

How Mobile Agents Work:The top class in Telescriptís object hierarchy

is the process

Page 97: TIB JINI. INTRODUCTION Here we look at only one type(web,object,file). Clear separation between computation and coordination exists. A distributed system.

How Mobile Agents Work:A Telescript engine is itself a multitasking

interpreter which can run multiple processes and switches preemptively between them. Hence, the engine can host multiple agents that share data/information between themselves

Page 98: TIB JINI. INTRODUCTION Here we look at only one type(web,object,file). Clear separation between computation and coordination exists. A distributed system.

How Mobile Agents Work:Telescript makes use of these three language

concepts: places, agents and "go". Go" is the primitive which allows for inter-

process communication A "go" requires a destination space and the

host engine packages up the agent along with all its data, stack and instruction pointer and ships it off to its destination place which may be across a vast WAN

Page 99: TIB JINI. INTRODUCTION Here we look at only one type(web,object,file). Clear separation between computation and coordination exists. A distributed system.

How Mobile Agents Work:At its destination, the other Telescript-

enabled engine unpacks it, checks its authentication, and it is then free to execute at its new place. When it finishes, it returns to its original host having performed the task required by its owner. Non-cooperation occurs when a place refuses to accept an incoming agent process

Page 100: TIB JINI. INTRODUCTION Here we look at only one type(web,object,file). Clear separation between computation and coordination exists. A distributed system.

Advantages of the Mobile Agent Paradigm

• reduce bandwidth consumption and network loads

• allow dynamic deployment of application components to arbitrary network sites

• encapsulate protocols• execute asynchronously and autonomously• can adapt by moving• run on heterogeneous platforms • most distributed applications fit naturally into the

mobile agent model• intuitively suitable for mobile users and

disconnected operations• Mobile agents combine the strengths of

techniques such as RPC, java applets etc. into a single, convenient framework