36
PRESENTATION ON JINI Technology SUBMITTED BY Rachna

JINI Technology

Embed Size (px)

DESCRIPTION

Technology based on JAVA for distributed computting

Citation preview

Page 1: JINI Technology

PRESENTATION ONJINI Technology

SUBMITTED BY

Rachna

Page 2: JINI Technology

Introduction to JINI• Jini is a way to do distributed computing that helps you

manage the dynamic nature of networks.• Provides mechanisms to enable smooth adding,

removal, and finding of devices and services on the network.

• Provides a programming model for reliable, secure distributed services and makes it easier for programmers to get their devices talking to each other.

• Jini technology promises to be a reality in the immediate future as an architecture to enable connections between devices any time, anywhere.

Page 3: JINI Technology

Why Jini technology? • Today devices are unaware of their surroundings.• They are rigid and they can not adapt.• We expend a lot of efforts to install it.• We need an expert to do it for us.• In JINI, No system administrator required.• Everything on the network (hardware or software) is

a "service“.• Each service represented by a mobile object.

Page 4: JINI Technology

Working Model• The Java programming language is the key to

making Jini technology work. Built on top of Java, object serialization, and Java Remote Method Invocation (RMI), it enables objects to move around the network from virtual machine to virtual machine. Jini attempts to extend the benefits of object-oriented programming to the network.

• Jini is written in pure Java but the clients and the services are not constrained to be in Java.

Page 5: JINI Technology

5

How Jini works? (Process)

• To use a service, a person or a program locates the service using the lookup service.

• The service's interface is copied from the lookup service to the requesting device where it will be used.

• The lookup service acts as a switchboard to connect a client looking for a service with that service.

• Once the connection is made, the lookup service is not involved in any of the resulting interactions between that client and that service.

Page 6: JINI Technology

6

Where it can be placed?

Page 7: JINI Technology

Architectural Overview• The whole technology can be segmented into :– Infrastructure– Programming Model– Services

Page 8: JINI Technology

Infrastructure• Set of components, includes the minimal JINI

technology core, that enables building of the system.

Page 9: JINI Technology

Lookup Service• Central storage of services available within the

system• It is the fundamental part of the infrastructure.• It organizes services into groups.– Service can be a member of multiple groups.– Multiple Lookup Services can maintain the

same group.– This helps to achieve fault tolerance.

Page 10: JINI Technology

How things work (Service Side)?• When a new service is created, it register itself

with a Lookup Service (Join). • It must first locate the appropriate Lookup service

(Discovery).• This done using the Discovery/Join Protocol.

Page 11: JINI Technology

How things work (Client Side)?• Client locate the appropriate Lookup Service

(Discovery).• It locates a service by querying the Lookup Service

(Lookup)• This done using the Discovery/Lookup Protocol.• Then, Client and service can communicate

directly.

Page 12: JINI Technology

Discovery Protocol• It can be :– Multicast Discovery Protocol.(looking for an appropriate Lookup Service)– Unicast Discovery Protocol.(looking for a specific Lookup Service or non-local

Lookup service)– Multicast Announcement Protocol.(Allow Lookup services to advertise their

presence)

Page 13: JINI Technology

Multicast Request Protocol

Page 14: JINI Technology

Unicast Discovery Protocol

Page 15: JINI Technology

Multicast Announcement Protocol

Page 16: JINI Technology

Join Protocol

• A service discovers the appropriate Lookup Service.

• It connects via the Lookup Service registrar.• The Service sends some info about itself.• The Lookup Service stores the information

and associate it with the requested group, if any.

Page 17: JINI Technology

Join Protocol

Page 18: JINI Technology

Lookup Protocol

• A Client discovers the appropriate Lookup Service.

• It’ll query for the service.• If found, the object reference of the

requested service will be loaded into the client.

• Finally, client invoke the service.

Page 19: JINI Technology

Lookup Protocol

Page 20: JINI Technology

Distributed Security System

• Define how entities got the right to perform actions on their behalf or on behalf of others.

• It extends JDK1.2 platform’s security model to the world of distributed systems.

Page 21: JINI Technology

Leasing • Access to many of the services in the Jini system

environment is lease based. A lease is a grant of guaranteed access over a time period. Each lease is negotiated between the user of the service and the provider of the service as part of the service protocol: A service is requested for some period; access is granted for some period, presumably taking the request period into account. If a lease is not renewed before it is freed--either because the resource is no longer needed, the client or network fails, or the lease is not permitted to be renewed--then both the user and the provider of the resource may conclude that the resource can be freed.

Page 22: JINI Technology

AR.2.1.6 Transactions

• A series of operations, either within a single service or spanning multiple services, can be wrapped in a transaction. The Jini transaction interfaces supply a service protocol needed to coordinate a two-phase commit. How transactions are implemented--and indeed, the very semantics of the notion of a transaction--is left up to the service using those interfaces.

Page 23: JINI Technology

• AR.2.1.7 Events • The Jini architecture supports distributed

events. An object may allow other objects to register interest in events in the object and receive a notification of the occurrence of such an event. This enables distributed event-based programs to be written with a variety of reliability and scalability guarantees.

Page 24: JINI Technology

Programming Model

• Set of interfaces that enables the construction of reliable services.

• These interfaces make up the distributed extension of Java.

• All interfaces are written in Java• Free source code.• Has no limit, and it can be extended.

Page 25: JINI Technology

Programming Model Cont..

• These interfaces include :– Leasing interface– Events interface– Transaction interface

Page 26: JINI Technology

Leasing interface

• Access to many services in the JINI system is lease based.

• Lease grant guaranteed access to the service over a period of time.

• It is negotiable.• Can be exclusive or non-exclusive.• Can be renewed.

Page 27: JINI Technology

Example

• When a service registers with the lookup service, it receives a lease.

• It need to renew periodically.• When service failed or lease get expired,

service will be removed.

Page 28: JINI Technology

Distributed Events Interface

• It extends JavaBeans Event Model to the world of Distributed Systems.

• One object, Event Listener, registers an interest in event of another object, Event Generator.

• Listener will be notified in a timely and reliable fashion.

• Registration of interest is lease based

Page 29: JINI Technology

Transaction Interface

• Transactions enables operation grouping. Either all Succeed or all Fail.

• The JINI’s Transaction Interface supply a service protocol needed to coordinate 2-Phase commit protocol.

Page 30: JINI Technology

Service

• Something that can be used by a person, program or another service.

• It can be : Computational, Storage, Software, Hardware or Communication Channel.

• It has an interface which define the operations that can be requested.

Page 31: JINI Technology

Services Cont..

• Service objects can be written in any language. Client does not care.

• But the interface has to be written in Java.• One of them is JavaSpaces which can be used

for simple communication and storage of related groups of objects.

Page 32: JINI Technology

Example

Page 33: JINI Technology

33

Advantages• We no longer need a computer to act as an

intermediary between a cell phone and a printer• These devices can take care of themselves-they are

flexible, they adapt• Self configure• Self diagnose• Self install• Reduce need for expert help• Lower total cost

Page 34: JINI Technology

34

Disadvantages

• Communication overhead, so some time it’s slow

• High Learning curve and some cost involve

Page 35: JINI Technology

Conclusion

• JINI is the feature of distributed systems.• The dynamic nature of JINI allows

resources to be added, subtracted at anytime without bothering other components.

• Open Source Code is available for download. Thus it has no limit.

Page 36: JINI Technology

References• The main JINI page at Sun:

http://java.sun.com/products/jini/• JINI specifications:

http://java.sun.com/products/jini/specs/ • JINI-USERS mailing list archives:

http://archives.java.sun.com/archives/jini-users.html • Bill Venners' JINI/JavaSpaces talk:

http://www.artima.com/javaseminars/modules/JINI/Handout.html

• JINI Community Web Site, devoted to JINI http://www.jinivision.com