Скачать презентацию Jini TM Architecture Source Sun Microsystems Inc Скачать презентацию Jini TM Architecture Source Sun Microsystems Inc

7af3bbe25eeb74ce15d9b1a4636f1744.ppt

  • Количество слайдов: 43

Jini. TM Architecture Source : Sun Microsystems Inc. , Jini. TM Architecture Specification; www. Jini. TM Architecture Source : Sun Microsystems Inc. , Jini. TM Architecture Specification; www. sun. com/jini/specs/jini 1_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

Topics • Who developed Jini? • Why Jini? • What are the Goals, benefits, Topics • Who developed Jini? • Why Jini? • What are the Goals, benefits, and Limitations? • What is Jini? • Jini Architecture Overview • Related technology

Who developed Jini? • Jim Waldo (COBRA, RMI, Java. Spaces) • Bill Joy (BSD Who developed Jini? • Jim Waldo (COBRA, RMI, Java. Spaces) • Bill Joy (BSD Unix, Sun. OS) • Ken Arnold (Java. Spaces) • Bob Sheifler (X Window Systems) In addition, many developers and partners involved in developing and assist in maturing Jini technology

Why Jini? Distributed computing is more difficult than local computing because of: • Network Why Jini? Distributed computing is more difficult than local computing because of: • Network Latency • Concurrency issues • Memory Management • Inevitable partial failure

Goals of Jini • Enabling users to share services and resources over a network 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

Benefits (value) of Jini • Makes using a network more like using a phone 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

Limitations of Jini • Scalability – intended for less than 1, 000 resources • Limitations of Jini • Scalability – intended for less than 1, 000 resources • Requires Java 2 Platform, 48 KB 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)

What is Jini Technology? • An infrastructure to federate services in a distributed system 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

What is Jini Technology? • Adapting to the changing nature of the network and 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

Key Concepts • Services • Lookup Services • Discovery and Join protocols • Java Key Concepts • Services • Lookup Services • Discovery and Join protocols • Java Remote Method Invocation (RMI) • Security • Leasing • Transaction • Distributed Events

Jini Architecture Overview Jini Service Jini infrastructure Application Service Lookup Discovery/Join RMI Operating System Jini Architecture Overview Jini Service Jini infrastructure Application Service Lookup Discovery/Join RMI Operating System Network Transport • Java VM and RMI is the basis for Jini infrastructure. • Java VM and portable object code provides benefit of homogeneous network and architecture independence

Components of a Jini System • Jini extends the Java Platform Divided into three 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

Components of a Jini System Infrastructure Programming Model Services Base Java VM Java RMI Components of a Jini System Infrastructure Programming Model Services Base Java VM Java RMI Java Security Java API Java. Beans Swing JNDI JTS Enterprise Beans Java + Jini Leasing Events Transaction Printing Transaction Manager Other services Discovery/Join Lookup Distributed security

Jini Infrastructure – Jini Lookup Service • Repository of available services • Stores each 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

Jini Infrastructure – Jini Lookup Service • In short, Jini Lookup service is about 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

Jini Infrastructure – Discovery/Join protocol • Discovery and join occur when device is plugged 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

Jini Infrastructure – Discovery/Join protocol • A service provider is the originator of the 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

Jini Infrastructure – Discovery/Join protocol • Along with service objects, descriptive service attributes (service 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

Jini Infrastructure – Java RMI • Java Remote Method Invocation (RMI) mechanism is a 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-byreference) 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

Jini Infrastructure – Java RMI • Communication among services uses Java RMI • RMI 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

Jini Infrastructure – Distributed Security • A distributed security system that extends the basic 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)

Jini Infrastructure – Discovery protocol Lookup Service LUS UDP Multicast Lookup Service LUS Service Jini Infrastructure – Discovery protocol Lookup Service LUS UDP Multicast Lookup Service LUS Service provider seeks LUS Client Service Provider Service Object Service Attribute

Jini Infrastructure – Join protocol Lookup Service Object Service Attribute Client A service provider Jini Infrastructure – Join protocol Lookup Service Object Service Attribute Client 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 Service Provider Service Object Service Attribute

Jini Infrastructure – Lookup Service Client Requests a service by type (java interfaces) and/or Jini Infrastructure – Lookup Service 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 Client Service Object Lookup Service Object Service Attribute Service Provider

Jini Infrastructure – Using Service • All communication happens between the client and the 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

Jini Infrastructure – Using Service • The client interacts directly with the service provider Jini Infrastructure – Using Service • The client interacts directly with the service provider via the service object (proxy) • Lookup service is no longer involved Client Service Object Lookup Service Object Service Attribute Service Provider

Example – Jini Enabled Printer GUI Drivers Jini Infrastructure Java VM Example – Jini Enabled Printer GUI Drivers Jini Infrastructure Java VM

Example – Discovery Multicast query for Lookup service UDP Multicast Example – Discovery Multicast query for Lookup service UDP Multicast

Example – Discovery Lookup service discovered LUS Example – Discovery Lookup service discovered LUS

Example – Join Printer registers service object (proxy) with LUS Example – Join Printer registers service object (proxy) with LUS

Example – Lookup Client search LUS for Printer ? LUS Example – Lookup Client search LUS for Printer ? LUS

Example – Lookup LUS returns printer service to client LUS Example – Lookup LUS returns printer service to client LUS

Example – Using services Client communicates to printer through service object (any protocol) LUS Example – Using services Client communicates to printer through service object (any protocol) LUS

Programming Model – distributed leasing • Problem : Partial failure in distributed systems can 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)

Programming Model – distributed leasing • If lease expires without renewal, user and provider 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

Programming Model – distributed Events • Jini extends standard Java event mechanism to work 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

Programming model – Transaction • Jini includes interfaces that define the functionality needed for 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)

Services • Infrastructure and programming model are built to enable services to be offered 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

Services are defined by Java interfaces I’m a printer Interface printer I’m a color Services are defined by Java interfaces I’m a printer Interface printer I’m a color printer Interface Color Printer

Client finds service by interface Client Give me a Printer Interface printer Interface Color Client finds service by interface Client Give me a Printer Interface printer Interface Color printer LUS

Jini and CORBRA/DCOM • Jini • Java technology centric • Code movement during runtime 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

Jini and UPn. P • Jini • Code movement during runtime • Service centric Jini and UPn. P • Jini • Code movement during runtime • Service centric • UPn. P • No code movement • Device centric • Integration • UPn. P devices can be wrapped as Jini services

Jini and Bluetooth • Open standard for wireless proximity networking communication • Based on Jini and 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, proxybased Jini services can be built