Jini Technology 제 1 회 한국 자바 개발자 컨퍼런스 발표자 : 강신동 Mobile : 016-201-5053 소속 : ㈜ idosi.com 대표이사 주최 : JavaCommunity.Org.

Slides:



Advertisements
Similar presentations
The Jini Technology Lookup Service. How Does It Work Services and clients find a lookup service using the discovery protocol Services advertise themselves.
Advertisements

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.
Java Remote Method Invocation (RMI) In Java we implement object systems: O1O2 O3 thread 1thread 2 execution scheme JVM 1JVM 2 distribution scheme.
Remote Method Invocation
Introduction to Jini & JavaSpaces
Changing the way of designing distributed applications Communication oriented design: FIRST design the communication protocol for the distributed system.
FONG CHAN SING (143334) WONG YEW JOON (143388). JAVA RMI is a distributive system programming interface introduced in JDK 1.1. A library that allows an.
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.
Remote Method Invocation Chin-Chih Chang. Java Remote Object Invocation In Java, the object is serialized before being passed as a parameter to an RMI.
Java RMI. What is RMI? RMI is an RPC system for an object based language. Objects provide a natural granularity for the binding of functions. –RMI allows.
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.
Introduction to Remote Method Invocation (RMI)
How Does Remote Method Invocation Work? –Systems that use RMI for communication typically are divided into two categories: clients and servers. A server.
Parallel Computing using JavaSpaces -Presented by Shilpi Basak Advisor: Prof: Dick Steflik.
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.
Java RMI Essentials Based on Mastering RMI Rickard Oberg.
Introduction - What is Jini Technology?
Nov 6, 2000CS851 Ubiquitous Computing1 The Jini Architecture Speaker: Weisheng Si Dept. of Computer Science University of Virginia.
JavaSpaces Prabhaker Mateti Wright State University.
January 26, Jim Waldo Copyright 1999 Sun Microsystems, Inc., all rights reserved.
+ A Short Java RMI Tutorial Usman Saleem
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.
Tanenbaum & Van Steen, Distributed Systems: Principles and Paradigms, 2e, (c) 2007 Prentice-Hall, Inc. All rights reserved Chapter 4 Communication.
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.
1 Java RMI G53ACC Chris Greenhalgh. 2 Contents l Java RMI overview l A Java RMI example –Overview –Walk-through l Implementation notes –Argument passing.
11/13/00 1 Design of a Home Network Rajesh Rajamani
Spring/2002 Distributed Software Engineering C:\unocourses\4350\slides\DefiningThreads 1 RMI.
Java Remote Method Invocation RMI. Idea If objects communicate with each other on one JVM why not do the same on several JVM’s? If objects communicate.
RMI Continued IS Outline  Review of RMI  Programming example.
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.
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.
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.
Service Discovery Protocols Mobile Computing - CNT Dr. Sumi Helal Professor Computer & Information Science & Engineering Department University.
Jini Architectural Overview Li Ping
Remote Method Invocation with Java-RMI
Case Study PrintService -dynamically networked products, services, and applications -network computer / consoles (powerful processor, several MB of memory)
Remote Method Invocation A Client Server Approach.
UMBC Distributed Computing with Objects RMI/Corba CMSC 432 Shon Vick.
Java RMI. RMI Any object whose methods can be invoked from another Java VM is called a remote object.
January 26, Ken Arnold Copyright 1999 Sun Microsystems, Inc., all rights reserved.
1 Lecture 15 Remote Method Invocation Instructors: Fu-Chiung Cheng ( 鄭福炯 ) Associate Professor Computer Science & Engineering Tatung Institute of Technology.
Distributed programming in Java Faculty:Nguyen Ngoc Tu Session 5 - RMI.
CSC 480 Software Engineering Lab 6 – RMI Nov 8, 2002.
Lecture 15 Jini Technology Instructors: Fu-Chiung Cheng ( 鄭福炯 ) Associate Professor Computer Science & Engineering Tatung University
Netprog Java RMI1 Remote Method Invocation.
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.
Java Distributed Computing
Java Remote Method Invocation (RMI)
Remote Method Invocation
The Jini Technology: An overview
Bina Ramamurthy Chapter 9
Jini Instructors: Geoffrey Fox and Bryan Carpenter
Bina Ramamurthy Chapter 9
Bond-Jini Interoperability
Bina Ramamurthy Chapter 9
Overview of RMI Architecture
JINI ICS 243F- Distributed Systems Middleware, Spring 2001
Java Remote Method Invocation
Presentation transcript:

Jini Technology 제 1 회 한국 자바 개발자 컨퍼런스 발표자 : 강신동 Mobile : 소속 : ㈜ idosi.com 대표이사 주최 : JavaCommunity.Org 발표일자 : 2000 년 4 월 9 일

목 차목 차 1. Jini 개요 2. Jini site 와 개발도구 3. bytecode 이동과 instance 이동 4. Discovery 5. Join 6. Lookup 7. Lookup reservation 8. Lease 9. Using back-end process 10. RMI diagram 11. Jini diagram 강신동

Jini Home Network

Jini Client - Server Web server chip Jini 의 실예 강신동

Jini site 와 개발도구 JDK 1.2 (Java 2) 이상 rmid : lookup daemon Jini Technology Starter Kit (jini1.1 alpha) reggie : sun’s lookup service httpd web server for downloading rmi’s stub class Lookup service 이용을 위한 기본도구 Jini web site 강신동

bytecode 이동과 instance 이동 bytecode 의 network 이동 instance 의 network 이동 Ex) applet client 중심개념 실행코드가 run-time 상태의 client JVM 으로 이동 모든 instance 는 client 의 JVM 에서 생성된다 Ex) Jini service 중심개념 interface 이용 실행코드와 data 의 run-time 시 이동 service 에서 만들어진 instance 가 동적으로 client 의 JVM 에서 즉시 이용될 수 있는 특징 network 에서 이동된 instance 는 client 에서 만들어진 instance 처럼 이용 강신동

Discovery Lookup-service Service Client Service 는 자신을 등록하기 위해 network 상에서 Lookup service 를 찾는다. Client 는 등록된 Service 를 찾기 위해 network 상에서 Lookup service 를 찾는다. 강신동

Discovery protocol Lookup ServiceDiscoverer Request message UDP multicast Response message TCP unicast Multicast request protocol Lookup ServiceDiscoverer Request message TCP unicast Response message TCP unicast Multicast announcement protocol Announcement message UDP multicast Request message TCP unicast Response message TCP unicast Unicast discovery protocol 강신동

Discovery (receive ServiceRegistrar) Lookup-service Service Client ServiceRegistrar Service JVM Client JVM Lookup JVM 강신동

Discovery (code) UnicastDiscovery MulticastDiscovery Lookup-service 의 위치를 알고있는 경우 TCP/IP Socket 이용 직접 접속 (port 4160) synchronous processing LookupLocator lookup = new LookupLocator(“jini://jini.idosi.com”); ServiceRegistrar registrar = lookup.getRegistrar(); Lookup-service 의 위치를 모르는 경우 Multicast 이용 lookup-service 응답기다림 service 에서 cient 로 TCP/IP Socket 이용연결 asynchronous processing LookupDiscovery discover = new LookupDiscovery(LookupDiscovery.ALL_GROUPS); discovery.addDiscoveryListener(listener); public void discovered(DiscoveryEvent evt) { ServiceRegistrar[] registrars = evt.getRegistrars(); } 강신동

Join (service copy) Service Service Copy Service Proxy ServiceRegistrar ServiceItem Service JVM 강신동

Join (regist service proxy) Lookup-service Service Service Copy Service Proxy register ServiceRegistrar Service JVM Lookup JVM 강신동

Join (code) ServiceRegistrar registrar = …; ServiceID id = null; // 전세계에서 유일한 id 부여 Entry entry = null; // service 의 부가정보제공 MyServiceInterface proxy = createServiceInterfaceInstance(); ServiceItem item = new ServiceItem(id, proxy, entry); long leaseTime = 1 * 60 * 1000; // msec ServiceRegistration registration = registrar.register(item, leaseTime); 강신동

Lookup (receive service copy) Lookup-service Lookup JVM Client ServiceTemplate Service copy Client JVM 강신동

Lookup (code) ServiceRegistrar registrar = …; ServiceID id = null; // 전세계에서 유일한 id 부여 Entry entry = null; // service 의 부가정보제공 Class[] types = { MyServiceInterface.class }; ServiceTemplate template = new ServiceTemplate(id, types, entry); Object o = registrar.lookup(template); if (o instanceof MyServiceInterface) { MyServiceInterface service = (MyServiceInterface) o; Object result = service.callMyMethod(); } 강신동

Lookup Reservation Client ServiceTemplat e Client JVM RemoteEventListener Lookup-service Lookup JVM notify ServiceEvent ServiceItem Service Copy 강신동

Lookup Reservation (code) ServiceRegistrar registrar = …..; Entry entry = null; long leaseTime = 1 * 60 * 1000; EventRegistration evtreg = registrar.notify(template, ServiceRegistrar.TRANSITION_NOMATCH_MATCH, myRemoteEventListener, entry, leaseTime); MyRemoteEventListener extends UnicastRemoteObject implements RemoteEventListener public void notify(RemoteEvent evt) throws RemoteException, UnknownEventException { if (evt instanceof ServiceEvent) { ServiceEvent sevt = (ServiceEvent) evt; ServiceItem item = sevt.getServiceItem(); MyServiceInterface service = (MyServiceInterface) item.service; Object result = service.callMyMethod(); } 강신동

Lookup federation topology Community of communities Hierarchies StarsIsland 강신동

Lease (service side) Lookup-service Service register ServiceRegistrar Service JVM Lookup JVM ServiceRegistration Lease renew() 강신동

Lease (service code) ServiceRegistration registration = registrar.register(…….); public void run() { while (true) { try { Lease lease = registration.getLease(); long expiration = lease.getExpiration(); long sleepTime = computeSleepTime(); Thread.sleep(sleeptime); lease.renew( 1 * 60 * 1000); } Lease expiration time line now renew zone 강신동

Lease (client side) Lookup-service notify ServiceRegistrar Client JVM Lookup JVM EventRegistration Lease renew() Client 강신동

Lease (client code) ServiceRegistration servreg = registrar.register(……); Lease lease = servreg.getLease(); long expiration = lease.getExpiration(); if ( RENEW_ZONE) { lease.renew(LEASE_TIME); } EventRegistration evtreg = registrar.notify(……); Lease lease = evtreg.getLease(); long expiration = lease.getExpiration(); if ( RENEW_ZONE) { lease.renew(LEASE_TIME); } service renew lease client renew lease 강신동

Using Back-end Process Lookup-service Lookup JVM Service Service Proxy Remote Server Client RMI, Socket... Service JVMClient JVM choke point 강신동

RMI diagram RemoteInterface RemoteImpl UnicastRemoteObject SkeletonStub RemoteInterface rmiregistry webserver client Server JVM Client JVM bind lookup rmi stubcode 강신동

Jini diagram (service copy) MyInterface Serializable MyService rmid (reggie) register MyInterface client lookup MyService Web server MyInterface Service JVM Client JVM 강신동

Jini diagram (service proxy) MyInterfaceSerializable rmid (reggie) register MyInterface client lookup MyInterface Service JVM Client JVM RemoteProtocol proxy RemoteInterrface Backend SkeletonStub rmi Web server