The Jini Vision - PowerPoint PPT Presentation

About This Presentation
Title:

The Jini Vision

Description:

'Jini technology is a simple infrastructure for providing services in a network, ... Vers int Port int Group. Len int Group 1 string Group 2 string ... – PowerPoint PPT presentation

Number of Views:35
Avg rating:3.0/5.0
Slides: 36
Provided by: scie311
Learn more at: https://www.cs.rit.edu
Category:
Tags: jini | vers | vision

less

Transcript and Presenter's Notes

Title: The Jini Vision


1
The Jini Vision
Jini technology is a simple infrastructure for
providing services in a network, and for creating
spontaneous interactions between programs that
use these services.
2
Jini Goals
  • Network plug and work
  • Erase the hardware/software distinction
  • Enable spontaneous networking
  • Promote service-based architecture
  • Simplicity

3
Client-Server Application
Client Logic
Proxy
Server
Client
4
Adding an Interface
Client Logic
Interface
Proxy
Server
5
Client-Service Application
Client Logic
Proxy
Server
Interface
Interface
Service
6
Registering A Service
Proxy
Interface
Server
Lookup Service
7
Client Lookup
Interface
Lookup Service
Client
Proxy
Interface
8
Client-Service Application
Client Logic
Proxy
Server
Interface
Any protocol
9
Jinis Involvement
  • Jini is involved with
  • The discovery of a service
  • The delivery of a proxy to use that server
  • Jini
  • Is not necessarily part of the client or the
    server
  • More of a broker
  • Can be used with non-Java applications

10
Jini
Client
Client
Client
Client
Client
Proxy
Lookup Service
Proxy
Proxy
Proxy
Service
Service
Service
11
Jini
Client
Client
Client
Client
Client
Proxy
Lookup Service
Proxy
Proxy
Proxy
Service
Service
Service
12
Jini
Client
Client
Client
Client
Client
Proxy
Proxy
Lookup Service
Proxy
Proxy
Proxy
Service
Service
Service
13
Jini
Client
Client
Client
Client
Client
Proxy
Proxy
Lookup Service
Proxy
Proxy
Proxy
Service
Service
Service
14
What Jini is Not
  • Jini is not
  • A Name Server
  • Java Beans
  • Enterprise Java Beans
  • RMI
  • A Distributed Operating System

15
Communities
  • Jini services join together in cooperating sets
    called communities
  • All services in a community are aware of each
    other and are able to use each other
  • Big enough to support a workgroup (services
    needed by 10 100 people)
  • Federation provides the ability for communities
    to be linked together

16
Five Key Concepts of Jini
  • Jini is based around five key concepts
  • Discovery
  • Lookup
  • Leasing
  • Remote Events
  • Transactions

17
Discovery
  • The process by which Jini applications find the
    lookup services that serve their community
  • End result is a set of lookup services
  • Does not assume knowledge of what communities
    exist
  • Finds and registers with nearby lookup services

18
Requirements for Discovery
  • Discovery should
  • Be flexible enough to support a range of
    community topologies
  • Promote easy recovery from network partitions and
    machine failures
  • Be lightweight
  • Two types
  • Serendipitous
  • Direct

19
Service Initiated Discovery
  • Used by services to join a nearby community
  • Uses the multicast request protocol
  • Implemented using a low-level multicast facility
  • UDP datagrams are used as the basis of the
    protocol

20
Multicast Request Protocol
21
Multicast Request Protocol
Request Message (sent via UDP multicast
22
Multicast Request Protocol
Request Message (sent via UDP multicast
Response Message (sent via TCP unicast)
23
Request Packet Format
Vers ltintgt
Port ltintgt
Where the discoverer wants replies Sent to
Group Len ltintgt
Group 1 ltstringgt
Group 2 ltstringgt

Desired groups (length 0 ? all)
Heard Len ltintgt
Heard 1 ltsvc idgt
Heard 2 ltsvc idgt

Known Lookup Services
24
Multicast Announcement
25
Multicast Announcement
Announcement Message (sent via UDP multicast)
26
Multicast Announcement
Announcement Message (sent via UDP multicast)
Request Message (sent via TCP unicast)
27
Multicast Announcement
Announcement Message (sent via UDP multicast)
Request Message (sent via TCP unicast)
Response Message (sent via TCP unicast)
28
Announcement Packet Format
Vers ltintgt
Host ltstringgt
Port ltintgt
My Id ltsvc idgt
Service information (header)
Group Len ltintgt
Group 1 ltstringgt
Group 2 ltstringgt

Groups that I am a member of
29
Unicast Discovery Protocol
30
Unicast Discovery Protocol
Request Message (sent via TCP Unicast)
31
Unicast Discovery Protocol
Request Message (sent via TCP Unicast)
Response Message (sent via TCP Unicast)
32
Lookup
  • A lookup service is almost like a name server
  • Maintains a list of service items (contains a
    proxy and attributes)
  • Object oriented so you can search based on
    interfaces/superclasses
  • You can also search for objects that have certain
    attributes

33
Local vs. Remote Event
  • Local Events
  • Can easily be delivered in the order they are
    generated
  • Will always be delivered
  • Cost to send the event is relatively small
    compared to to the work that needs to be done to
    handle the event
  • An observable object can safely deliver events to
    observers

34
Remote Event Model
  • Similar to the event model in the JFC
  • The interface used to receive events is an RMI
    remote interface
  • Very narrow classes
  • Single interface to implement to receive events
  • Single method in the interface
  • One class of remote events

35
Transactions
  • Provide ACID properties
  • Implemented by a transaction manger
  • Transaction participants
  • Prepare
  • Commit
  • Abort
  • PrepareAndCommit
Write a Comment
User Comments (0)
About PowerShow.com