Top Banner
Jini TM Architecture Source : Sun Microsystems Inc., Jini TM Architecture Specification; www.sun.com/jini/specs/jini1_2.pdf Jini TM – A Technology for interconnecting heterogeneous devices; Lauri Eronen University of Helsinki, Department of Computer Science California Software Laboratories, Jini by example - Whitepaper; www.cswl.com/whitepaper/tutorials/jini.html Sun Microsystems Inc., Jini TM Connection Technology Architecture Overview by Bill Day Presented by Mark Miyashita 04-08-2002
43

Jini TM Architecture Source : Sun Microsystems Inc., Jini TM Architecture Specification; .

Dec 27, 2015

Download

Documents

Frank Cox
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: Jini TM Architecture Source : Sun Microsystems Inc., Jini TM Architecture Specification;  .

JiniTM Architecture

Source : Sun Microsystems Inc., JiniTM Architecture Specification; www.sun.com/jini/specs/jini1_2.pdf

JiniTM – A Technology for interconnecting heterogeneous devices; Lauri Eronen University of Helsinki, Department of Computer

Science

California Software Laboratories, Jini by example - Whitepaper; www.cswl.com/whitepaper/tutorials/jini.html

Sun Microsystems Inc., JiniTM Connection Technology Architecture Overview by Bill Day

Presented by Mark Miyashita

04-08-2002

Page 2: Jini TM Architecture Source : Sun Microsystems Inc., Jini TM Architecture Specification;  .

Topics

• Who developed Jini?

• Why Jini?

• What are the Goals, benefits, and Limitations?

• What is Jini?

• Jini Architecture Overview

• Related technology

Page 3: Jini TM Architecture Source : Sun Microsystems Inc., Jini TM Architecture Specification;  .

Who developed Jini?

• Jim Waldo (COBRA, RMI, JavaSpaces)

• Bill Joy (BSD Unix, SunOS)

• Ken Arnold (JavaSpaces)

• Bob Sheifler (X Window Systems)

In addition, many developers and partners involved in developing and assist in maturing Jini technology

Page 4: Jini TM Architecture Source : Sun Microsystems Inc., Jini TM Architecture Specification;  .

Why Jini?

Distributed computing is more difficult than local computing because of:

• Network Latency

• Concurrency issues

• Memory Management

• Inevitable partial failure

Page 5: Jini TM Architecture Source : Sun Microsystems Inc., Jini TM Architecture Specification;  .

Goals of Jini

• Enabling users to share services and resources over a network

• Providing users easy access to resources anywhere on the network while allowing the network location of the user to change

• Simplifying the task of building, maintaining, and altering a network of devices, software, and users

Page 6: Jini TM Architecture Source : Sun Microsystems Inc., Jini TM Architecture Specification;  .

Benefits (value) of Jini

• Makes using a network more like using a phone (plugging in networked devices and application software is as simple as plugging in a phone)

• Simplifies adding and management of application services easier

• Simplifies the task of writing distributed application by freeing programmers from worrying about underlying network topology

Page 7: Jini TM Architecture Source : Sun Microsystems Inc., Jini TM Architecture Specification;  .

Limitations of Jini

• Scalability – intended for less than 1,000 resources

• Requires Java 2 Platform, 48KB of memory – Jini’s Java-dependency, require too much processing power and memory for most devices (new Jini device architecture Specification address this issue)

• Many standardized interfaces for Jini services are under development (Jini Printer Working group, Jini Storage Working Group, see www.jini.org)

Page 8: Jini TM Architecture Source : Sun Microsystems Inc., Jini TM Architecture Specification;  .

What is Jini Technology?

• An infrastructure to federate services in a distributed system

• Jini enables spontaneous networks of software services and devices to assemble into working groups of objects, or federation

• Simplify delivery and access of network services

• Jini addresses the problem of distributed computing using a set of simple interfaces and protocols

Page 9: Jini TM Architecture Source : Sun Microsystems Inc., Jini TM Architecture Specification;  .

What is Jini Technology?

• Adapting to the changing nature of the network and mobility of devices and services

• Jini provides simple mechanisms which enables devices and services to be removed/added to the federation

• Everything is represented by Java objects

• Everything is located and accessed through Java interfaces

Page 10: Jini TM Architecture Source : Sun Microsystems Inc., Jini TM Architecture Specification;  .

Key Concepts

• Services

• Lookup Services

• Discovery and Join protocols

• Java Remote Method Invocation (RMI)

• Security

• Leasing

• Transaction

• Distributed Events

Page 11: Jini TM Architecture Source : Sun Microsystems Inc., Jini TM Architecture Specification;  .

Jini Architecture Overview

Jini Service Application Service

Lookup

Discovery/Join

RMI

Operating System

Network Transport

Jini infrastructure

• Java VM and RMI is the basis for Jini infrastructure.

• Java VM and portable object code provides benefit of homogeneous network and architecture independence

Page 12: Jini TM Architecture Source : Sun Microsystems Inc., Jini TM Architecture Specification;  .

Components of a Jini System• Jini extends the Java Platform

Divided into three categories:

• Infrastructure – set of components that enables building a federated Jini system (defines the minimal Jini code)

• Services – actual services constructed using Jini (entities within the federation)

• Programming Model – set of interfaces that enables the construction of reliable services including the services belonging as part of the infrastructure as well as actual services

Page 13: Jini TM Architecture Source : Sun Microsystems Inc., Jini TM Architecture Specification;  .

Components of a Jini System

Infrastructure Programming Model

Services

Base Java

Java VMRMIJava Security

Java APIJavaBeansSwing

JNDIJTSEnterpriseBeans

Java +Jini

Discovery/JoinLookupDistributed security

LeasingEventsTransaction

PrintingTransaction ManagerOther services

Page 14: Jini TM Architecture Source : Sun Microsystems Inc., Jini TM Architecture Specification;  .

Jini Infrastructure – Jini Lookup Service

•Repository of available services

•Stores each service as Java objects

•Clients download services on demand

•Lookup service provides mapping: interfaces to objects

•Lookup service may include entry for other lookup services (federated with other lookup services)

•Lookup service interface provides: registration, access, search, removal

Page 15: Jini TM Architecture Source : Sun Microsystems Inc., Jini TM Architecture Specification;  .

Jini Infrastructure – Jini Lookup Service

• In short, Jini Lookup service is about finding service in the federation by the client

• To find a service, a Jini client locates appropriate service by querying a lookup service by type (Java interface)

• Code moves from service to client via lookup service

• Code needed to use service is dynamically loaded into client on demand

Page 16: Jini TM Architecture Source : Sun Microsystems Inc., Jini TM Architecture Specification;  .

Jini Infrastructure – Discovery/Join protocol

• Discovery and join occur when device is plugged in (pair of protocol used to find and join a group of services)

• Discovery occurs when a service provider is looking for a lookup service with which to register

• Join occurs when a service has located a lookup service and wishes to join it

• Jini discovery/join is the process of adding a service to a Jini system

Page 17: Jini TM Architecture Source : Sun Microsystems Inc., Jini TM Architecture Specification;  .

Jini Infrastructure – Discovery/Join protocol

• A service provider is the originator of the service – software or hardware

• Based on UDP multicast – service provider locates a lookup service by multicasting a request on the local network for any lookup services

• Provide required software drivers and its capabilities – service object (proxy) for the service is loaded into the lookup service

• Service object (proxy) contains the Java programming language interface for the service, including the methods that users and application will invoke to execute the service

Page 18: Jini TM Architecture Source : Sun Microsystems Inc., Jini TM Architecture Specification;  .

Jini Infrastructure – Discovery/Join protocol

• Along with service objects, descriptive service attributes (service capability) gets loaded into lookup service during the join phase

• In short, discovery/join protocol establish references with lookup service

• Unicast discovery also supported

Page 19: Jini TM Architecture Source : Sun Microsystems Inc., Jini TM Architecture Specification;  .

Jini Infrastructure –Java RMI

• Java Remote Method Invocation (RMI) mechanism is a fundamental for Jini

• RMI is an Java language based extension to traditional remote procedure call mechanism

• Passing both remote object references (pass-by-reference) and actual object (pass-by-value) as method parameters are possible

• RMI allows not only data to be passed from object to object around network but also, full objects including executable code to be move around in a network

Page 20: Jini TM Architecture Source : Sun Microsystems Inc., Jini TM Architecture Specification;  .

Jini Infrastructure –Java RMI

• Communication among services uses Java RMI

• RMI provides

• Activation – Java objects that provides services need not be running all the time (it can be activated by RMI when a request for the service arrives)

• garbage collection

• multicast

Page 21: Jini TM Architecture Source : Sun Microsystems Inc., Jini TM Architecture Specification;  .

Jini Infrastructure –Distributed Security

• A distributed security system that extends the basic Java security model (JVM protects the client from malicious downloaded code that could cause damage)

• Principal – Jini services are accessed on behalf of some entity which generally traces back to a particular user of the system

• Access control list – Associates access privileges with each object implementing a service (service may request access to other service based on the identity of the object that implements the service)

Page 22: Jini TM Architecture Source : Sun Microsystems Inc., Jini TM Architecture Specification;  .

Jini Infrastructure – Discovery protocol

Client

Service Provider

Service Object

Service Attribute

Lookup Service LUS

Lookup Service LUS

Lookup Service LUS

Service provider seeks LUS

UDP Multicast

Page 23: Jini TM Architecture Source : Sun Microsystems Inc., Jini TM Architecture Specification;  .

Jini Infrastructure – Join protocol

Lookup Service

Service Object

Service Attribute

Service Provider

Service Object

Service AttributeClient

A service provider registers a service object (proxy) and its service attributes with the lookup service (joins a federation) for other clients and services to use

Page 24: Jini TM Architecture Source : Sun Microsystems Inc., Jini TM Architecture Specification;  .

Jini Infrastructure – Lookup Service

Service ProviderClient

Service Object

Lookup Service

Service Object

Service Attribute

Client Requests a service by type (java interfaces) and/or service attributes. A copy of the service object is moved to the client to talk to the service provider

Page 25: Jini TM Architecture Source : Sun Microsystems Inc., Jini TM Architecture Specification;  .

Jini Infrastructure – Using Service

• All communication happens between the client and the service through service object (proxy)

• Independent of wire protocol – the method of communication between the client and the service is not specified in the Jini architecture

• The actual communication method is determined by the service provider, who provides service object (proxy) that implements that interface

• Protocol can change without affecting client

• RMI semantics is core to functionality – it can use any other communication method

Page 26: Jini TM Architecture Source : Sun Microsystems Inc., Jini TM Architecture Specification;  .

Jini Infrastructure – Using Service

Client

Service Object

Lookup Service

Service Object

Service Attribute

Service Provider

•The client interacts directly with the service provider via the service object (proxy)

• Lookup service is no longer involved

Page 27: Jini TM Architecture Source : Sun Microsystems Inc., Jini TM Architecture Specification;  .

Example – Jini Enabled Printer

GUI

Drivers

Jini Infrastructure

Java VM

Page 28: Jini TM Architecture Source : Sun Microsystems Inc., Jini TM Architecture Specification;  .

Example –Discovery

Multicast query for Lookup service

UDP Multicast

Page 29: Jini TM Architecture Source : Sun Microsystems Inc., Jini TM Architecture Specification;  .

Lookup service discovered

LUS

Example –Discovery

Page 30: Jini TM Architecture Source : Sun Microsystems Inc., Jini TM Architecture Specification;  .

Example –Join

Printer registers service object (proxy) with LUS

LUS

Page 31: Jini TM Architecture Source : Sun Microsystems Inc., Jini TM Architecture Specification;  .

Example –Lookup

Client search LUS for Printer

LUS

Printer ?

Page 32: Jini TM Architecture Source : Sun Microsystems Inc., Jini TM Architecture Specification;  .

Example –Lookup

LUS returns printer service to client

LUS

Page 33: Jini TM Architecture Source : Sun Microsystems Inc., Jini TM Architecture Specification;  .

Example –Using services

Client communicates to printer through service object (any protocol)

LUS

Page 34: Jini TM Architecture Source : Sun Microsystems Inc., Jini TM Architecture Specification;  .

Programming Model –distributed leasing

• Problem : Partial failure in distributed systems can lead to unchecked resource consumption

• An access to services in Jini is lease based

• A lease is a grant of access over a time period (protocol for managing resources using a renewable, duration based model)

• Each lease is negotiated (contracted) between the user of the service and the provider as part of this protocol

• Leases are either exclusive or non-exclusive (service can not be shared)

Page 35: Jini TM Architecture Source : Sun Microsystems Inc., Jini TM Architecture Specification;  .

Programming Model –distributed leasing

• If lease expires without renewal, user and provider can free up associated resources

• Leases handle client and network failure, removal of services (leases may be cancelled, renewed, allowed to expire)

• Resources are allocated only as long as continued interest is shown by leasee (leasee’s responsibility to renew lease before expires)

• Used also in LUS to keep the list of available service up to date (service provider must renew the lease)

• In short, lease provides a method of managing resources in a environment where failure can occur

Page 36: Jini TM Architecture Source : Sun Microsystems Inc., Jini TM Architecture Specification;  .

Programming Model –distributed Events

• Jini extends standard Java event mechanism to work in a distributed network

• Register interest, receive notification (an object may allow other object to register interest in the object and receive a notification of the occurrence of such an event

• Use RMI and distributed leasing protocol

• In LUS, delivering to the LUS information about state changes of services registered to the LUS

Page 37: Jini TM Architecture Source : Sun Microsystems Inc., Jini TM Architecture Specification;  .

Programming model –Transaction

• Jini includes interfaces that define the functionality needed for performing a two-phase commit (Jini specification does not dictate the semantics for the concept of transaction, only interfaces are provided)

• Transaction interface introduce a lightweight, object oriented protocol enabling applications to coordinate state changes (designed for distributed object coordination)

Page 38: Jini TM Architecture Source : Sun Microsystems Inc., Jini TM Architecture Specification;  .

Services• Infrastructure and programming model are built to enable services to be offered and found in network federation

• Service may be added or removed from a federation at any time

• Provides mechanism for service registration, lookup, and use

• Services represented (defined) by Java interfaces – implementation can change over time without effecting infrastructure or clients

Page 39: Jini TM Architecture Source : Sun Microsystems Inc., Jini TM Architecture Specification;  .

Services are defined by Java interfaces

I’m a printer

I’m a color printer

Interface printer

Interface Color

Printer

Page 40: Jini TM Architecture Source : Sun Microsystems Inc., Jini TM Architecture Specification;  .

Client finds service by interface

Interface Color printer

Interface printer

Client LUSGive me a Printer

Page 41: Jini TM Architecture Source : Sun Microsystems Inc., Jini TM Architecture Specification;  .

Jini and CORBRA/DCOM

• Jini

• Java technology centric

• Code movement during runtime

• COBRA/DCOM

• Cross language support

• No code movement

• Integration

• COBRA/DCOM components can be wrapped as Jini services

Page 42: Jini TM Architecture Source : Sun Microsystems Inc., Jini TM Architecture Specification;  .

Jini and UPnP

• Jini

• Code movement during runtime

• Service centric

• UPnP

• No code movement

• Device centric

• Integration

• UPnP devices can be wrapped as Jini services

Page 43: Jini TM Architecture Source : Sun Microsystems Inc., Jini TM Architecture Specification;  .

Jini and Bluetooth

• Bluetooth

• Open standard for wireless proximity networking communication

• Based on low cost, short range radio link

• Ad-hoc connection among mobile devices

• Jini and Bluetooth

• For IP-based Bluetooth devices, Jini should work without modifications

• For non-IP-based Bluetooth devices, proxy-based Jini services can be built