Presentation is loading. Please wait.

Presentation is loading. Please wait.

JINI Gijung Yun © Realtime Embedded Systems Laboratory Inha University

Similar presentations


Presentation on theme: "JINI Gijung Yun © Realtime Embedded Systems Laboratory Inha University"— Presentation transcript:

1 JINI Gijung Yun © Realtime Embedded Systems Laboratory Inha University
Java Intelligent Network Infra-structure  Gijung Yun © Realtime Embedded Systems Laboratory Inha University Version 1.2

2 Contents Introduction Jini Environment Jini Infrastructure
Vision and Charicteristic Jini Environment Jini Infrastructure Jini Architecture RMI Discovery, join and lookup 3. Leasing Events 5. Transaction 6. Services Entry 8. Security

3 Introduction Jini Goals Network plug and work
Enable spontaneous networking Promote service-based architecture Simplicity Resources can be implemented as either hardware devices, software programs, or a combination of the two.

4

5 관련 기술 UPnP HAVi MS, Compaq, Intel, Philips…
Sony, Philips, Samsung, Sun… 가정내 AV기기를 접속하는 기술

6 Characteristic 100% Pure Java Collection of API’s and Protocols
Infrastructure Built on RMI Discovery, Join and Service Protocols Lookup Service Programming Model Leasing Interface Event and Notification Interfaces Transaction Interfaces Services Fundamental entity of Jini Reference Implementations Supplied

7 Jini Environment Java 2 compatible VM Network of reasonable speed
Multicast support preferable Initial support for TCP/IP only Class file server HTTP most commonly used Dynamic address allocation DHCP Devices should have some memory and CPU Can use a ‘proxy’ as an alternative

8 Jini Infrastructure Jini
It is a set of software layers that together create a federation of computer devices and services Directory Services JavaSpaces Jini RMI Boot, Discover, Join Java VM Windows Unix Other OS or Devices

9 Jini Architecture RMI Discovery, Join & Lookup Leasing Events Transactions Services

10 Remote Method Invocation Object-Oriented RPC
RMI Remote Method Invocation Object-Oriented RPC Similar to CORBA Distinguished by ability to parse objects by value

11 Discovery, Join and Lookup
Find a Lookup Service Multicast UDP for nearby Lookup services Unicast TCP for known Lookup services Join Used by services to register with a Lookup Service Registration Utility Classes LookupDiscover for multicast discovery LookupLocator for unicast discovery

12 Lookup Repository of available services
Stores each service as Java objects Clients and services use to request a service type from a Lookup service Search by type(Java Interface), not name Closer to CORBA Trader service than CORBA Naming service

13 Discovery and Join Service Provider J 512 byte Discovery Multicast RMI
Join Upload RMI Reference Jini Lookup Service J 출처: Sun

14 Lookup Service Provider Service Consumer J J RMI Reference Lookup
Download Discovery Jini Lookup Service J 출처: Sun

15 (sent via UDP multicast)
Request Message (sent via UDP multicast) Announcement Message (sent via UDP multicast) Discoverer Lookup Service Discoverer Lookup Service Request Message (sent via TCP unicast) Response Message (sent via TCP unicast) Response Message (sent via TCP unicast)

16 Request packet format Vers <int> Port <int>
Where the discoverer wants replies Sent to Group Len <int> Group 1 <string> Group 2 <string> Desired groups (length == 0  all) Heard Len <int> Heard 1 <svc id> Heard 2 <svc id> Known Lookup Services

17 Announcement packet format
Vers <int> Host <string> Port <int> My Id <svc id> Service information (header) Group Len <int> Group 1 <string> Group 2 <string> Groups that I am a member of

18 Lookup Services Maps interfaces indicating the functionality provided by a service to sets of objects that implement the service Object Store Print Service must be serialisable and implement Entry Copier Printer Fax Canon HP LBP-1260 J J J 출처: Sun BJC-70 BJ-100

19 May be federated with other lookup services
Lookup service interface provides: Registration, Access, Search, Removal

20 Network Issue IP-based Request Packet size limitation (512Byte)
Limiting the scope of multicast TTL ( recommend 15 )

21 A form of Distributed ‘Garbage Collection’
Distributed Leasing A form of Distributed ‘Garbage Collection’ Enables stability and resilience Service is ‘loaned’ to a client for a certain period of time Delegation of Lease Renewal Allows clients/services to delegate lease renewal to a third party object

22 Attribute Modification
If a service is asked to change the set of attributes with which it registers itself, it saves the changed set in a persistent store, then performs the requested change at each lookup service with which it is registered.

23 Registering and Unregistering with Lookup Services
register with lookup service adds that lookup service to the persistent set of lookup services it should join, and then registers itself with that lookup service. unregister from lookup service service is in the persistent set of lookup services to join, it should be removed from that set. the service cancels the leases for all entries it maintains at that lookup service.

24 join a group it adds the name of that group to the persistent set of groups to join, and either starts or continues to perform multicast discovery using this augmented group.

25 leaving a group It removes that group from the persistent set of groups to join. It removes all lookup services that match only that group in the set of groups it is interested in from the set it has discovered using multicast discovery, and unregisters from those lookup services. It either continues to perform multicast discovery with the reduced set of groups or, if the set has been reduced to empty, ceases multicast discovery.

26 Distributed Events Extends the standard Java event model
Adds features to provide resilience and determination in a distributed environment Registration for event notifications is lease based Unique event identifiers assigned to every event supplier Event sequence numbers assigned to every event Event types Marshaled Object enables: Store-and-forward Notification filter Notification MailBox

27 Transactions Set of Interfaces that support the implementation of a two-phase commit protocol Designed to be lightweight Left to developer to implement as much (or as little) of the transactional semantics as they need Lease based - transaction will fail if not completed within leased period Supports distributed transactions Sample Implementation supplied in Jini distribution

28 출처: Sun

29 Services Services are defined by their interface Services must:
Discover and register with a lookup service(s) Maintain the following across failures: ServiceID(128bit) assigned by a lookup service The service attributes that define its lookup entry The group(s) the service participates in Specific lookup services it must participate in Maintain all leases with lookup services they have registered with Utility Classes provided to manage these responsibilities

30 Using a Service Communication is between service and its proxy
Independent of wire protocol Protocol can change without affecting client RMI semantics core to functionality

31 Entry Typed set of objects, for matching
Provides extra information about services A service may have any number of entries Clients request services by class and/or by entries, using a simple matching system Drawback: relational operators such as < and != are not supported

32 There are some convenience subclasses of Entry:
Address: the address of the physical component of a service. Location: the location of the physical component of a service. It can be used alone in a small, local organization. Comment: a free-form comment about the service. Name: name(s) of the service as seen by users. ServiceInfo: generic information about a service. Includes the name of the manufacturer, the product, and the vendor. ServiceType: human-oriented information about the "type" of a service. This is not related to its data or class types. Status: the base class from which other status-related entry classes may be derived.

33 Security The design of the security model for Jini technology is built on the twin notions of a principal and an access control list. Jini services are accessed on behalf of some entity—the principal—which generally traces back to a particular user of the system. Whether access to a service is allowed depends on the contents of an access control list that is associated with the object (entity).

34 The Sun Community Source License (SCSL)
Three Levels of Participation Research and Education Source code freely available Can be used in any way other than deployment Internal Deployment Deployed code must pass a compatibility test Commercialisation Source code available with Jini trademark for a branding fee Branding fee covers cost of trademark protection and compatibility testing Low cost fee is based on either annual fee or royalty per device/service sold - whichever is the lower

35 Jini philosophy is useful
Summary Jini limitations TCP/IP, multicast, Java RMI, Java 2 VM Jini philosophy is useful

36 Web Sites Reference http://www.jini.org/ http://java.sun.com/jini
Jini starter kit 1.2.1


Download ppt "JINI Gijung Yun © Realtime Embedded Systems Laboratory Inha University"

Similar presentations


Ads by Google