Presentation is loading. Please wait.

Presentation is loading. Please wait.

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

Similar presentations

Presentation on theme: "TIB JINI. INTRODUCTION Here we look at only one type(web,object,file). Clear separation between computation and coordination exists. A distributed system."— Presentation transcript:


2 INTRODUCTION Here we look at only one type(web,object,file). Clear separation between computation and coordination exists. A distributed system is a collection of processes.

3 INTRODUCTION Each process is concerned with a specific computational activity. which in principle is carried out independently from other activities of other processes.

4 INTRODUCTION We are trying to separate computation from coordination. The coordination part of distributed system handles the communication and cooperation between the processes.


6 INTRODUCTION Referential 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.

7 INTRODUCTION Temporal 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.


9 TIB Coordination 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.

10 TIB Architecture

11 Architecture TIB uses multicasting to forward messages to subscribers. To cross-large scale networks, it effectively builds an overlay network with proprietary multicast routers.

12 WAN Architecture

13 Communication Events : 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.

14 Communication

15 Event 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

16 Communication

17 NAMING Names are important as they form address of the address of the message. Filtering facilities ensure that right messages reach right subscribers.



20 Transactional Messaging Ensures 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.

21 Transactional Messaging

22 Fault Tolerance: Multicasting TIB relies on multicasting for publishing messages to all subscribers. This mechanism needs to be extended to wide area networks and requires reliable multicasting. How?

23 Fault Tolerance: Multicasting Solution: Pragmatic General Multicast(PGM) A NACK based scheme in which receiver tells the sender that they are missing something

24 Fault Tolerance: Multicasting

25 SECURITY Goal: establish a secure channel between a publisher and a subscriber Referential decoupling between publisher and subscriber is lost Sender publishes encrypted data including its identity

26 SECURITY Each subscriber sets up a secure channel with the sender All subscribers share the same key to decrypt messages

27 SECURITY Diffie-Helman key exchange + public-key cryptography Assume Alice and Bob already: obtained certificates containing each-other public key established a shared key K A,B using Diffie-Helman

28 SECURITY Establish a secure channel between a specific publisher and specific subscriber.

29 TIB-SUMMARY Architecture Communication Naming Transactional Messaging Fault Tolerance Security

30 JINI Generative 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.

31 JINI Tuples 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.

32 JINI write(): 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


34 Write : 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.

35 Example: JavaSpace Hello World 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 JavaSpa ce Entry

36 Example: JavaSpace Hello World Use pattern matching to get desired objects from the space null value represent wildcard A message object with the content field set to null will return any message object A message object with the content field set to Berkeley will only return a message object with the content set to that value

37 Example: JavaSpace Hello World Message template = new Message(); //Content is null Message result = (Message) template, null, Long.MAX_VALUE); System.out.println(result.content); Hello World JavaSpa ce Read entry Entry Long.MAX_VALUE - timeout parameter

38 Communication : Notifications A 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.

39 Layered Architecture of Jini

40 Events A 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

41 Using Events with JavaSpaces

42 JavaSpace Implementation Replicate JavaSpace at all machines Store tuples locally, search everywhere Partial replication and searching Use DHTs?

43 Replicate Everywhere

44 Search Everywhere

45 Partial Replication and Searching

46 Lookup Service Can be implemented using JavaSpaces Each service inserts a tuple describing itself JavaSpace notifies interested clients when service becomes available Instead, Jini provides a specialized lookup service A service registers itself using (attribute, value)-pairs E.g., service parameters, location

47 Service Item FieldDescription ServiceIDThe identifier of the service associated with this item Service A (possibly remote) reference to the object implementing the service AttributeSetsA set of tuples describing the service Tuple TypeAttributes ServiceInfoName, manufacturer, vendor, version, model, serial number LocationFloor, room, building Address Street, organization, organizational unit, locality, state or province, postal code, country Predefined tuples:

48 Transactions Aim 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

49 Transactions Jini Supply the mechanism of two-phase commit protocol Leave the policy to the participants in a transaction

50 Transactions A transaction is represented by a long identifier, obtained from a transaction manager Each transaction is associated a lease; if lease expires, transaction is aborted

51 JINI-SUMMARY Transactions


53 SOFTWARE AGENT Why Agent? To simplify distributed computing.

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


56 we identify seven types of agents: Collaborative agents Interface agents Mobile agents Information/Internet agents Reactive agents Hybrid agents Smart Agents

57 Panoramic Classification

58 Characteristics of Agents Autonomous. Adaptive and proactive. Mobile – ability to migrate to a remote system, perform the tasks and return the results. Persistent. Goal Oriented Communicative, Collaborative, Cooperative. Flexible.

59 Agent Vs Object Object 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.

60 Agent Vs Object Differences 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 its 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.

61 Agent Vs Object In 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

62 AGENT TECHNOLOGY The 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.

63 Requirements to Build Agent An 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.

64 Requirements to Build Agent be 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.

65 Agent Architecture

66 Terminology AgentHost: 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.

67 Terminology AgentInterface: 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.

68 AGENT TECHNOLOGY The 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.

69 AGENT TECHNOLOGY In 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.

70 AGENT TECHNOLOGY The two agent languages are: KQML(Knowledge Query and Manipulation Language) FIPA (Foundation for Intelligent Physical Agents)

71 AGENT TECHNOLOGY KQML was developed in the early 1990s as a part of US govt. ARPA knowledge sharing project. FIPA was much standardised by Europe. Both deal with agent-to-agent communication

72 AGENT TECHNOLOGY The power of agent technology depends on inter-agent communication. Powerful agents need to communicate with Users System Resources

73 Benefits of Agents Reduce 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.

74 Drawbacks of Agents Lack 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.

75 Agent Applicatons User Interface Agents Microsoft Office Assistant. Business process Agents Data-driven workflow management. Information Management Agents filtering agents. Web browsing assistant Notification agents. Resource Discovery agents.

76 Agent Platforms Telescript (General Magic). Aglets Workbench (IBM). Concordia (Mitsubishi). JADE (Java Agent Development Framework, Sun Microsystems). Grasshopper (IKV++). Odyssey (General Magic). Voyager (Object Space).

77 MOBILE AGENT Software program Moves 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 agents originating source is not required

78 MOBILE AGENT Mobile Code – transfers code Mobile Object – transfers code + data Mobile Process – transfers code + data + thread state Mobile Agent – transfers code + data + thread + authority of its owner

79 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 CLIENTSERVER network

80 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 Agent Service

81 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

82 MOBILE AGENTS Mobile 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

83 MOBILE AGENTS These duties may range from a flight reservation to managing a telecommunications network NOTE: mobility is neither a necessary nor sufficient condition for agenthood

84 MOBILE AGENTS Mobile agents are agents because they are autonomous and they cooperate, albeit differently to collaborative agents

85 MOBILE AGENTS For 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.

86 MOBILE AGENTS The 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

87 MOBILE AGENTS These 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

88 MOBILE AGENTS For 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

89 MOBILE AGENTS Consider 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.

90 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

91 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

92 How Mobile Agents Work:

93 It shows just one of these Telescript engines integrated onto an operating system via a programming interface called the Telescript application programmer interface (API

94 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

95 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

96 How Mobile Agents Work: The top class in Telescriptís object hierarchy is the process

97 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

98 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

99 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

100 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

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

Similar presentations

Ads by Google