SDSU CS 696 Emerging Technologies: Java Distributed Computing
Spring Semester, 1999
Jini Intro
Previous    Lecture Notes Index    Next    
© 1999, All Rights Reserved, SDSU & Roger Whitney
San Diego State University -- This page last updated 11-Mar-99

Contents of Doc 15, Jini Intro


References


Jini Architecture Specification 1.0 January 25, 1999
Jini Device Architecture Specification 1.0 January 25, 1999
Jini Distributed Leasing Specification 1.0 January 25, 1999
These documents are available at: http://www.sun.com/jini/specs/index.html

New Webster’s Dictionary, 1981

Doc 15, Jini Intro Slide # 2

Jini


Jinn (jinni, genie)
One of a class of spirits lower than the angels, capable of appearing in human and animal forms, and exercising influence over mankind for good and evil
New Webster’s Dictionary, 1981

A Jini system (djinn) is a distributed system based on the idea of federating groups of users and the resources required by those users.

A Jini system consists of the following parts:
Provides an infrastructure for federating services in a distributed system
Supports and encourages the production of reliable distributed services
Offer functionality to any other member of the federation

The end goals Jini include the following:



Doc 15, Jini Intro Slide # 3
Jini System Requirements

Network
Reasonable speed
Bandwidth requirements vary among devices
Reasonable latency

Jini is Java-based
Any language that produces Java byte codes can be used

Devices
Some memory and processing power to run Java or
Connected to a device (proxy) that contains the memory and processing power


Doc 15, Jini Intro Slide # 4

Jini System Overview

Terms
Services
A service is an entity that can be used by a person, program or another service
A service can be:
a computation,
storage,
communication channel to another user
a software filter
a hardware device
another user
Lookup Service
Is used to find services in a djinn ( a Jini system)
Leasing
A lease provides access to a service for a fixed time period
If a lease is not renewed at the end of the lease period, then the user and provider of the service can free all resources connected the lease
Transactions
Provides protocol for a two-phase commit process for managing state changes between objects in a Jini system
Events
Distributed events
Distributed version of listeners or Observer-Observable


Doc 15, Jini Intro Slide # 5

Component Overview



Infrastructure
Programming Model
Services
Base
Java
Java VM
RMI
Java Security
Java APIs
JavaBeans
JNDI
Enterprise Beans
JTS
JMS
Java +
Jini
Discorvery/Join
Distributed Security
Lookup
Leasing
Transactions
Events
Transaction Manager
JavaSpaces
Lookup service
...

Discovery
Service provider looks for a lookup service to register itself
Join
Service provider is registered in the lookup service
Service provider registers:
A remote reference to itself
Descriptive attributes about the service
Lookup
Client requests a service by Java type and/or by attributes
Client receives remote reference to the service

Jini 1.0 Service Application Names
Service
Application Name
Lookup
reggie
Transaction
mahalo
JavaSpaces
outrigger


Doc 15, Jini Intro Slide # 6

Basic Device Architecture Examples

(Note: Images are taken from Jini Distributed Leasing Specification.)

Devices with Resident Java Virtual Machines



Devices Using Specialized Virtual Machines

A Jini device does not need to support the entire JVM. One should be able to configure Personal Java or Embedded Java to support Jini. Sun’s documentation is not clear on this point.

Clustering Devices (physical option)


Doc 15, Jini Intro Slide # 7
Clustering Devices (network option)


Jini Software Services over the Internet Inter-Operability Protocol

IIOP (Internet Inter-Operability Protocol) is a Corba standard for communication between Corba orbs

Sun has RMI-IIOP which implements a subset of RMI over IIOP

The Sun documentation states:
appears that the Jini Lookup service interfaces are in conformance with the ®RMI over IIOP subset

For more information about RMI-IIOP see: http://developer.java.sun.com/developer/earlyAccess/rmi-iiop/index.html

For more information about the issues of doing RMI over IIOP see:
Java Language to IDL Mapping at ftp://ftp.omg.org/pub/docs/orbos/98-07-19.pdf and Object by Value at ftp://ftp.omg.org/pub/docs/orbos/98-01-18.pdf.

For more information about Corba see http://www.omg.org/corba/beginners.html

Doc 15, Jini Intro Slide # 8

Distributed Leasing


Distributed systems must deal with:

Jini’s Distributed leasing:

A lease is
"a time period during which the grantor of the lease insures (to the best of the grantor’s abilities) that the holder of the lease will have access to some resource."

Lease duration
Can be solely determined by lease grantor
Negotiated between grantor and holder of the lease

Lease holder can:
Request a renewal of the lease
Cancel a lease
When a lease is cancelled the grantor of the lease can clean up any resources allocated to support the lease and "obliges the grantor of the lease to not take any action involving the leaseholder that was part of the agreement that was the subject of the lease”.

A lease can expire
"Both the grantor and the holder are obliged to act as though the leased agreement is no longer in force."

Lease time is not measured in absolute time, but in duration. Clients should use the time they requested the lease as the beginning of the lease duration.


Doc 15, Jini Intro Slide # 9
Basic Lease OperationsInterface net.jini.core.lease.Lease

Static Fields
//Length of lease
static long FOREVER = Long.MAX_VALUE;
static long ANY = -1;
//Formating of serialized Lease object
static int DURATION = 1;
static int ABSOLUTE = 2;

Methods
long getExpiration();
returns the expiration time (in milliseconds from the beginning of the epoch)

void cancel() throws UnknownLeaseException, RemoteException;

void renew(long duration) throws LeaseDeniedException,
UnknownLeaseException, RemoteException;
Duration is the new duration requested of the lease, it is not added to the remaining time of the lease

void setSerialFormat(int format);
Specifies how to store the lease time when serialized. Options are either duration (how long the lease will last from the time it was serialized) or absolute (in the current clock time). Use duration when sending a lease to a remote machine. Duration is the default.
int getSerialFormat();

LeaseMap createLeaseMap(long duration);
boolean canBatch(Lease lease);
Used in handling leases in batches.


Doc 15, Jini Intro Slide # 10
Lease Exceptions

LeaseDeniedException
An exception generated when a lease request or renewal is denied.
LeaseException
Generic superclass for specific lease exceptions.
LeaseMapException
An exception generated when a LeaseMap renewAll or cancelAll call generates exceptions on one or more leases in the map.
UnknownLeaseException
An exception used to indicate that a lease is not known to the grantor of the lease


Copyright ©, All rights reserved.
1999 SDSU & Roger Whitney, 5500 Campanile Drive, San Diego, CA 92182-7700 USA.
OpenContent license defines the copyright on this document.

Previous    visitors since 11-Mar-99    Next