1 JSK 1.1 A practical Approach Contents –Working with JSK 1.1 –Jini environments –Writing Jini software revisited –Important software packages in the JSK.

Slides:



Advertisements
Similar presentations
- 1 - Jini in the Enterprise O'Reilly Conference on Java Scott Oaks Sun Microsystems
Advertisements

An Introduction of Jini Technology Presenter: Carfield Yim, Gary Lam Date: 31-Jul-2002 How can JINI Technology Boost Our Business.
The Jini Technology Lookup Service. How Does It Work Services and clients find a lookup service using the discovery protocol Services advertise themselves.
1 Jini Tutorial, Part 3 Jini Programming. 2 Tutorial outline Part 1 Introduction Distributed systems Java basics Remote Method Invocation (RMI) Part 2.
Jini Tutorial, Part 2 Jini Overview.
What is RMI? Remote Method Invocation –A true distributed computing application interface for Java, written to provide easy access to objects existing.
Jini, third verse Richard Chapman October 13, 1999.
Mini project /2 Jini - a new computing paradigm.
THE JINI TECHNOLOGY Alessio Zumbo
Remote Method Invocation
Introduction to Jini & JavaSpaces
Notes to the presenter. I would like to thank Jim Waldo, Jon Bostrom, and Dennis Govoni. They helped me put this presentation together for the field.
I Dream of Jini An Independent Research Project By Noah J Ternullo & Dmitriy Gurlyand.
EEC-681/781 Distributed Computing Systems Lecture 5 Wenbing Zhao Department of Electrical and Computer Engineering Cleveland State University
CS 603 Jini April 10, What is Jini? Java Middleware Tools to construct federation –Multiple devices, each with Java Virtual Machine –Multiple services.
Distributed Service Architectures Yitao Duan 03/19/2002.
Mobile Agent Systems. Mobility Mobile Agents A Mobile Agent is a software agent that exists in a software Environment and can migrate from machine to.
CS CS 5150 Software Engineering Lecture 13 System Architecture and Design 1.
Parallel Computing using JavaSpaces -Presented by Shilpi Basak Advisor: Prof: Dick Steflik.
Using Lookup Services 1.What are Lookup Services 2.How Clients use lookup services 3.How Services use lookup services 4.Using events.
Jini Connection Technology Kaushik Lahoti. Jini: A Vision n Areas to focus on –Simplicity –Reliability –Scalability.
Jini™ Rashad Oreifej and Christopher Stricklan. Introduction ► Pronounced GEE-nee  Stands for (Java INference engine and networked Interactor)?  Loosely.
Presented by Mark Miyashita
Introduction - What is Jini Technology?
Nov 6, 2000CS851 Ubiquitous Computing1 The Jini Architecture Speaker: Weisheng Si Dept. of Computer Science University of Virginia.
Introduction to Grid Monitoring
JavaSpaces Prabhaker Mateti Wright State University.
January 26, Jim Waldo Copyright 1999 Sun Microsystems, Inc., all rights reserved.
JINI Gijung Yun © Realtime Embedded Systems Laboratory Inha University
1 Outline Week 1: Survey on various distributed Systems Week 2: Web Services Using JEE 5 or Glassfish Week 3: Multicast Week 3: RMI Callback, Security.
January 26, Bob Scheifler Copyright 1999 Sun Microsystems, Inc., all rights reserved. Jini™ Lookup Service Bob Scheifler Senior Staff Engineer Sun.
Sun’s Jini Lab 2 Service Registration Client Lookup.
A Look at Jini Jian He Roy Patrick Tan. Outline History Design Goals An Example Basic Components Top View Infrastructures --- Proxies, Discovery/join.
JavaSpaces TM By Stephan Roorda Source: JavaSpaces specification.
11/13/00 1 Design of a Home Network Rajesh Rajamani
CS CS 5150 Software Engineering Lecture 13 System Architecture and Design 1.
Spring/2002 Distributed Software Engineering C:\unocourses\4350\slides\DefiningThreads 1 RMI.
Jini tm NetworkingTechnology Directions Jim Waldo Jini Architect Sun Microsystems, Inc.
Client Call Back Client Call Back is useful for multiple clients to keep up to date about changes on the server Example: One auction server and several.
RMI remote method invocation. Traditional network programming The client program sends data to the server in some intermediary format and the server has.
20-Sep-2000Jini™ Connection Technology1 Rochester Institute of Technology Jini™ Connection Technology Alan Kaminsky Information Technology Laboratory Rochester.
Liang, Introduction to Java Programming, Seventh Edition, (c) 2009 Pearson Education, Inc. All rights reserved Chapter 43 Remote Method Invocation.
1 Lecture 16 Jini Technology Instructors: Fu-Chiung Cheng ( 鄭福炯 ) Associate Professor Computer Science & Engineering Tatung Institute of Technology
JINI Design and Principles Ranjita Bhagwan CSE225: High-Performance Distributed Computing.
Distributed Coordination-Based Systems Adapted from: "Distributed Systems", Tanenbaum & van Steen, course slides.
Hwajung Lee.  Interprocess Communication (IPC) is at the heart of distributed computing.  Processes and Threads  Process is the execution of a program.
Jini Architecture Alessandro Brawerman. Contents Jini definition Advantages Architecture How it works Websites to check.
JavaSpaces ™ Nati Shalom CTO GigaSpaces Technologies.
Service Discovery Protocols Mobile Computing - CNT Dr. Sumi Helal Professor Computer & Information Science & Engineering Department University.
JINI Coordination-Based System By Anthony Friel * David Kiernan * Jasper Wood.
Jini Architecture Introduction System Overview An Example.
Kemal Baykal Rasim Ismayilov
Jini Architectural Overview Li Ping
Case Study PrintService -dynamically networked products, services, and applications -network computer / consoles (powerful processor, several MB of memory)
January 26, Ken Arnold Copyright 1999 Sun Microsystems, Inc., all rights reserved.
Jini Technology 제 1 회 한국 자바 개발자 컨퍼런스 발표자 : 강신동 Mobile : 소속 : ㈜ idosi.com 대표이사 주최 : JavaCommunity.Org.
Lecture 15 Jini Technology Instructors: Fu-Chiung Cheng ( 鄭福炯 ) Associate Professor Computer Science & Engineering Tatung University
UMass Lowell Computer Science Java and Distributed Computing Prof. Karen Daniels Fall, 2000 Lecture 20 A little more on RMI Getting started with.
JINI – A next Generation Networking Technology Part I – Introduction.
Remote Method Invocation
What is RMI? Remote Method Invocation
Object Spaces 9/22/2018.
The Jini Technology: An overview
Bina Ramamurthy Chapter 9
An Introduction of Jini Technology
Bina Ramamurthy Chapter 9
Bina Ramamurthy Chapter 9
JINI ICS 243F- Distributed Systems Middleware, Spring 2001
Lili Shtorper Nava Vaisman
Presentation transcript:

1 JSK 1.1 A practical Approach Contents –Working with JSK 1.1 –Jini environments –Writing Jini software revisited –Important software packages in the JSK 1.1 –Usage of specific APIs Unicast Discovery Broadcast Discovery Service Registration Client Search Leasing –Helper utilities included in JSK 1.1 Discovery Management Lease Management Join Manager Schlatter:

2 Working with JSK 1.1 Status of JSK 1.1 –JSK 1.1 (Jini Technology Starter Kit, v 1.1) was released in october 2000 by Sun Microsystems, Inc. –JSK 1.1 is the second release of JSK improving JSK –Due to the rather short life of JSK there are yet many changes to come. What do you get from Sun Microsystems? –Core APIs to perform all typical tasks in a Jini environment –Helper utilites which gives the programmer high level interfaces to the core APIs –Some implementations of Jini services like reggie, a lookup service, or mahalo, a transaction manager service. –User friendly API documentation in HTML format –Specification docs of Jini in pdf format –Some Jini examples What do you need to run a Jini environment? –In addition to the JSK, one needs the JDK 1.2 (or higher) installed, since reggie is based on RMI. –All other software, like a simple HTTP server, is included in the JSK. Schlatter:

3 Jini Environments Lookup Service –Sun shippes an implementation of a lookup service called reggie. –reggie is implemented using the activation system of Java RMI.  an activation server ( rmid ) has to be running –With RMI, serialized instances of objects has to be shipped over the network  a HTTP (any other file delivery protocol like FTP works as well) server has to be running Services and Clients –Jini services and clients has to interact with Jini lookup services in a specified manner. This introduces the need of having at least all of the software pieces responsible for this interaction written in Java and running in a JVM. Service/Client Communication –The Jini specification gives no definitions on how services and clients do communicate (or even if they have to communicate at all). – Possible communication designs: No communication (proxy is the service) RMI proxy Non-RMI proxy (using as an example TCP sockets) RMI with non-RMI proxy Schlatter:

4 Writing Jini Software Client Structure in pseudocode –prepare for discovery –discover a lookup service –prepare a template for lookup search –lookup a service –call the service Service Structure in pseudocode –prepare for discovery –discovery a lookup service –create information about a service –export a service –renew leasing periodically Schlatter:

5 JSK 1.1 Packages Important Packages –net.jini.discovery These are utility classes and interfaces that conform to the discovery and join protocol defined in the Jini(TM) Discovery and Join Specification.  find lookup services –net.jini.core.discovery A standard utility class for finding particular lookup services.  find a particular lookup service –net.jini.lookup These are interfaces and classes for managing discovery of lookup services.  manage the discovery process –net.jini.core.lookup These are the lookup service interfaces and classes.  communicate with lookup services (e.g. register/find services) –net.jini.lease Interfaces and classes used for lease management.  manage leases –net.jini.core.lease These are distributed leasing interfaces and exception classes.  manipulate a distinct lease –net.jini.core.event The RemoteEventListener interface and related standard classes. –net.jini.space The JavaSpaces TM technology package. Schlatter:

6 Specific APIs: Unicast Discovery Packages –net.jini.core.discovery –net.jini.core.lookup Classes –net.jini.core.discovery.LookupLocator LookupLocator(java.lang.String url); LookupLocator(java.lang.String host,int port); ServiceRegistrar getRegistrar(); –net.jini.core.lookup.ServiceRegistrar Schlatter:

7 Specific APIs: Broadcast Discovery Packages –net.jini.discovery –net.jini.core.lookup Classes –net.jini.discovery.LookupDiscovery LookupDiscovery(java.lang.String[] groups); void addDiscoveryListener(DiscoveryListener l); –net.jini.discovery.DiscoveryEvent ServiceRegistrar[] getRegistrars(); –net.jini.core.lookup.ServiceRegistrar Interfaces –net.jini.discovery.DiscoverListener void discovered(DiscoveryEvent e); void discarded(DiscoveryEvent e);

8 Specific APIs: Service Registration Packages –net.jini.core.discovery –net.jini.core.lookup Classes –net.jini.core.lookup.ServiceRegistrar (= proxy for the lookup service) ServiceRegistration register(ServiceItem item, long leaseDuration); –net.jini.core.lookup.ServiceItem ServiceItem(ServiceID serviceID, java.lang.Object service, Entry[] attrSets); –net.jini.core.lookup.ServiceRegistration (= proxy for the registration) ServiceID getServiceID(); void addAttributes(Entry[] attrSets); void modifyAttributes(Entry[] attrSetTemplates, Entry[] attrSets); void setAttributes(Entry[] attrSets);

9 Specific APIs: Client Search Packages –net.jini.core.discovery –net.jini.core.lookup –net.jini.core.entry Classes –net.jini.core.lookup.ServiceRegistrar java.lang.Object lookup(ServiceTemplate tmpl) ServiceMatches lookup(ServiceTemplate tmpl, int maxMatches) –net.jini.core.lookup.ServiceTemplate ServiceTemplate(ServiceID serviceID, java.lang.Class[] serviceTypes, Entry[] attrSetTemplates); –net.jini.core.lookup.ServiceMatches ServiceItem[] items; int totalMatches ; (  items.length) –net.jini.core.lookup.ServiceItem Entry[] attributeSets; java.lang.Object service; ServiceID serviceID; Interfaces –net.jini.core.entry.Entry

10 Specific APIs: Leasing Packages –net.jini.core –net.jini.core.lookup –net.jini.core.lease Classes –net.jini.core.lookup.ServiceRegistrar ServiceRegistration register(ServiceItem item, long leaseDuration); –net.jini.core.lookup.ServiceRegistration Lease getLease(); Interfaces –net.jini.core.lease.Lease void cancel(); void renew(long duration); long getExpiration(); (  System.currentTimeMillis() ) static long FOREVER; static long ANY;

11 Helper Utilities: Discovery Management Interfaces and classes used for Discovery Management Helper classes –net.jini.discovery.LookupLocatorDiscovery LookupLocatorDiscovery(LookupLocator[] locators); –net.jini.discovery.LookupDiscoveryManager LookupDiscoveryManager(String[] groups, LookupLocator[] locators, DiscoveryListener listener); DiscoveryManagement DiscoveryGroupManagementDiscoveryLocatorManagement LookupDiscoveryLookupLocatorDiscovery LookupDiscoveryManager Looks after discovery events Looks after groups and multicast search Looks after unicast discovery net.jini.discovery

12 Helper Utilities: Lease Management Helper Class –net.jini.lease.LeaseRenewalManager LeaseRenewalManager(); LeaseRenewalManager(Lease lease, long desiredExpiration, LeaseListener listener); void renewUntil(Lease lease, long desiredExpiration, LeaseListener listener); Interfaces –net.jinj.lease.LeaseListener void notify(LeaseRenewelEvent e); Called by the LeaseRenewalManager when it cannot renew a lease that it is managing, and the lease's desired expiration time has not yet been reached.

13 Helper Utilities: Join Manager Helper Class –net.jini.lookup.JoinManager JoinManager(Object obj, Entry[] attrSets, ServiceIDListener callback, DiscoveryManagement discoverMgr, LeaseRenewalManager leaseMgr); JoinManager(Object obj, /* service */ Entry[] attrSets, ServiceID serviceID, DiscoveryManagement discoverMgr, LeaseRenewalManager leaseMgr); Usage of JoinManager –JoinManager encapsulates all of the necessary steps when registering a service and renewing the leases in all found lookup services. Interfaces –net.jini.lookup.ServiceIDListener void serviceIDNotify(ServiceID serviceID); Called when the JoinManager gets a valid ServiceID from a lookup service.