Presentation is loading. Please wait.

Presentation is loading. Please wait.

Presented by Mark Miyashita

Similar presentations


Presentation on theme: "Presented by Mark Miyashita"— Presentation transcript:

1 Presented by Mark Miyashita
JiniTM Architecture Source : Sun Microsystems Inc., JiniTM Architecture Specification; JiniTM – A Technology for interconnecting heterogeneous devices; Lauri Eronen University of Helsinki, Department of Computer Science California Software Laboratories, Jini by example - Whitepaper; Sun Microsystems Inc., JiniTM Connection Technology Architecture Overview by Bill Day Presented by Mark Miyashita

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

3 Who developed Jini? Jim Waldo (COBRA, RMI, JavaSpaces)
Bill Joy (BSD Unix, SunOS) Ken Arnold (JavaSpaces) Bob Sheifler (X Window Systems) In addition, many developers and partners involved in developing and assist in maturing Jini technology

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

5 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

6 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

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

8 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

9 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

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

11 Jini Architecture Overview
Jini Service Application Service Lookup Jini infrastructure 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

12 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

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

14 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

15 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

16 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

17 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

18 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

19 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-by-reference) 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

20 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

21 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)

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

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

24 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 Lookup Service Service Object Service Attribute Client Service Object Service Provider

25 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

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

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

28 Example – Discovery Multicast query for Lookup service UDP Multicast

29 Example – Discovery Lookup service discovered LUS

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

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

32 Example – Lookup LUS returns printer service to client LUS

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

34 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)

35 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

36 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

37 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)

38 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

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

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

41 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

42 Jini and UPnP Jini Code movement during runtime Service centric UPnP
No code movement Device centric Integration UPnP devices can be wrapped as Jini services

43 Jini and Bluetooth 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, proxy-based Jini services can be built


Download ppt "Presented by Mark Miyashita"

Similar presentations


Ads by Google