Presentation is loading. Please wait.

Presentation is loading. Please wait.

January 26, 1999--Jim Waldo Copyright 1999 Sun Microsystems, Inc., all rights reserved.

Similar presentations


Presentation on theme: "January 26, 1999--Jim Waldo Copyright 1999 Sun Microsystems, Inc., all rights reserved."— Presentation transcript:

1 January 26, 1999--Jim Waldo Copyright 1999 Sun Microsystems, Inc., all rights reserved.

2 Jini ™ Technology: Architecture and Programming Model Jim Waldo Senior Staff Engineer Sun Microsystems, Inc.

3 January 26, 1999--Jim Waldo Copyright 1999 Sun Microsystems, Inc., all rights reserved. A New Architecture Both hardware and software –Everything is an object –Everything is accessed through an interface Network and language centric –Data and code come from the network –The Java ™ language is assumed to be everywhere

4 January 26, 1999--Jim Waldo Copyright 1999 Sun Microsystems, Inc., all rights reserved. Philosophy Less is more –The simplicity of object-oriented design –RMI extends objects to the network Language-based system –Java language forms a conceptual frame –No division between network and programming types

5 January 26, 1999--Jim Waldo Copyright 1999 Sun Microsystems, Inc., all rights reserved. Unifying Architecture Designed for the network –Code and data move, as appropriate –Appropriate for everything -Devices -Large servers -Software Everything is an object –Hardware and software are services

6 January 26, 1999--Jim Waldo Copyright 1999 Sun Microsystems, Inc., all rights reserved. Goals of the Jini System Enable spontaneous networking –Plug in and join –Unplug and heal Provide reliable networks –Individual services more reliable –System independence from any single point of failure Above all, simplicity

7 January 26, 1999--Jim Waldo Copyright 1999 Sun Microsystems, Inc., all rights reserved. Extending the Java Platform InfrastructureServices Programming Model Java VM RMI Discovery Lookup Service Beans Swing... EJB JNDI JTS... JavaSpaces Transaction Manager... Leasing Transactions Distributed Events Distributed Security Lets objects find and communicate with each other, add simple APIs for Remote Objects and Basic Distributed Computing, and then everything else is a service. Java Jini

8 January 26, 1999--Jim Waldo Copyright 1999 Sun Microsystems, Inc., all rights reserved. The Jini Infrastructure RMI extends objects to the platform –Allows moving code and data –Merges agent technology with traditional RPC Federation through Discovery, Join, and Lookup –Provides the place for services to advertise –Provides the mechanism for finding that place

9 January 26, 1999--Jim Waldo Copyright 1999 Sun Microsystems, Inc., all rights reserved. Service Registration Jini service Lookup Service Discovery Request Discovery Response Service Proxy Object Service registration

10 January 26, 1999--Jim Waldo Copyright 1999 Sun Microsystems, Inc., all rights reserved. Service Lookup Jini client Lookup Service Discovery Request Discovery Response Lookup Request Service Proxy Object Lookup Response

11 January 26, 1999--Jim Waldo Copyright 1999 Sun Microsystems, Inc., all rights reserved. Client/Service Interaction Jini ClientJini Service Service Proxy Object

12 January 26, 1999--Jim Waldo Copyright 1999 Sun Microsystems, Inc., all rights reserved. Leaving a Jini Federation Services can cancel Lookup registration A registration lease can run out No administer is required

13 January 26, 1999--Jim Waldo Copyright 1999 Sun Microsystems, Inc., all rights reserved. Federation, not Central Control Not an operating system Defines minimal interaction rules –How to join, rendezvous –Group interaction patterns –All else left to consenting clients and services Designed to work with existing OSs

14 January 26, 1999--Jim Waldo Copyright 1999 Sun Microsystems, Inc., all rights reserved. Programming Model Three major interfaces –Distributed events –Transactions/two phase commit –Leasing Center on interaction patterns Define what, not how –All are interfaces –Services implement as best for them

15 January 26, 1999--Jim Waldo Copyright 1999 Sun Microsystems, Inc., all rights reserved. Distributed Events Extends AWT/JavaBeans event model –Allows third-party delivery services –Does not assume timely delivery Makes use of mobile objects –Notifications can include an object –This object can include behavior –Defers both when and what action is taken in response to an event

16 January 26, 1999--Jim Waldo Copyright 1999 Sun Microsystems, Inc., all rights reserved. Notification Class public class RemoteEvent extends java.util.EventObject{ public RemoteEvent(Object source, long eventID, long seqNum, MarshalledObject handback); public Object getSource(); public long getID(); public long getSequenceNumber(); public MarshalledObject getRegistrationObject(); }

17 January 26, 1999--Jim Waldo Copyright 1999 Sun Microsystems, Inc., all rights reserved. Remote Listener Interface public interface RemoteEventListener extends Remote, java.util.EventListener { void notify(RemoteEvent theEvent) throws UnknownEventException, RemoteException; }

18 January 26, 1999--Jim Waldo Copyright 1999 Sun Microsystems, Inc., all rights reserved. Transactions Allow multi-object coordination –Standard two-phase commit –No participant implementation guarantees –Designed for a mixed environment –Non-standard semantics supported Participant and manager interfaces –Transaction manager presented as a service

19 January 26, 1999--Jim Waldo Copyright 1999 Sun Microsystems, Inc., all rights reserved. Transaction Participant public interface TransactionParticipant extends Remote, TransactionConstants { int prepare(TransactionManager mgr, long id) throws UnknownTransactionException, RemoteException; void commit(TransactionManager mgr, long id) throws UnknownTransactionException, RemoteException; void abort (TransactionManager mgr, long id) throws UnknownTransactionException, RemoteException; int prepareAndCommit(transactionmanager mgr, long id) thrrows UnknownTransactionException, RemoteException; }

20 January 26, 1999--Jim Waldo Copyright 1999 Sun Microsystems, Inc., all rights reserved. Leasing Introduces time to resource allocation –Allocation requests for a duration –Grant duration <= request duration Leases can be –renewed (granter choice) –cancelled (holder choice) Leases can expire

21 January 26, 1999--Jim Waldo Copyright 1999 Sun Microsystems, Inc., all rights reserved. Leasing Interface public interface Lease { long getExpiration(); void cancel() throws UnknownLeaseException, RemoteException; void renew(long duration) throws LeaseDeniedException, UnknownLeaseException, RemoteException; void setSerialFormat (int format); int getSerialFormat(); LeaseMap createLeaseMap(long duration); boolean canBatch(Lease lease); }

22 January 26, 1999--Jim Waldo Copyright 1999 Sun Microsystems, Inc., all rights reserved. Why this model? Defines network interactions –Simple –Help in developing reliable distributed applications –Defines object interactions, not implementations

23 January 26, 1999--Jim Waldo Copyright 1999 Sun Microsystems, Inc., all rights reserved. Services Represented by interfaces –Implement in hardware or software –Implementations can change over time Set of services open ended –Devices –Software services –Business objects –etc.

24 January 26, 1999--Jim Waldo Copyright 1999 Sun Microsystems, Inc., all rights reserved. Existing Services JavaSpaces –A network object repository –Something between a file and a database Transaction manager –Default service implementation –Runs voting protocol

25 January 26, 1999--Jim Waldo Copyright 1999 Sun Microsystems, Inc., all rights reserved. Service Interfaces Still to be defined –Network storage –Printing –etc., etc. Don’t have to be done by Sun Only base types need to be common

26 January 26, 1999--Jim Waldo Copyright 1999 Sun Microsystems, Inc., all rights reserved. Legacy Services Jini requires Java at the network –Services identified by Java type –Proxies may need code downloaded Implementation can be non-Java –Wrap legacy language in Java –Make calls to legacy with JNI Turns language independence around

27 January 26, 1999--Jim Waldo Copyright 1999 Sun Microsystems, Inc., all rights reserved. In Summation Simple Object-oriented Java based Network centric Service architecture


Download ppt "January 26, 1999--Jim Waldo Copyright 1999 Sun Microsystems, Inc., all rights reserved."

Similar presentations


Ads by Google