Title: The Jini Vision
1The 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.
2Jini Goals
- Network plug and work
- Erase the hardware/software distinction
- Enable spontaneous networking
- Promote service-based architecture
- Simplicity
3Client-Server Application
Client Logic
Proxy
Server
Client
4Adding an Interface
Client Logic
Interface
Proxy
Server
5Client-Service Application
Client Logic
Proxy
Server
Interface
Interface
Service
6Registering A Service
Proxy
Interface
Server
Lookup Service
7Client Lookup
Interface
Lookup Service
Client
Proxy
Interface
8Client-Service Application
Client Logic
Proxy
Server
Interface
Any protocol
9Jinis 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
10Jini
Client
Client
Client
Client
Client
Proxy
Lookup Service
Proxy
Proxy
Proxy
Service
Service
Service
11Jini
Client
Client
Client
Client
Client
Proxy
Lookup Service
Proxy
Proxy
Proxy
Service
Service
Service
12Jini
Client
Client
Client
Client
Client
Proxy
Proxy
Lookup Service
Proxy
Proxy
Proxy
Service
Service
Service
13Jini
Client
Client
Client
Client
Client
Proxy
Proxy
Lookup Service
Proxy
Proxy
Proxy
Service
Service
Service
14What Jini is Not
- Jini is not
- A Name Server
- Java Beans
- Enterprise Java Beans
- RMI
- A Distributed Operating System
15Communities
- 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
16Five Key Concepts of Jini
- Jini is based around five key concepts
- Discovery
- Lookup
- Leasing
- Remote Events
- Transactions
17Discovery
- 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
18Requirements 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
19Service 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
20Multicast Request Protocol
21Multicast Request Protocol
Request Message (sent via UDP multicast
22Multicast Request Protocol
Request Message (sent via UDP multicast
Response Message (sent via TCP unicast)
23Request 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
24Multicast Announcement
25Multicast Announcement
Announcement Message (sent via UDP multicast)
26Multicast Announcement
Announcement Message (sent via UDP multicast)
Request Message (sent via TCP unicast)
27Multicast Announcement
Announcement Message (sent via UDP multicast)
Request Message (sent via TCP unicast)
Response Message (sent via TCP unicast)
28Announcement 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
29Unicast Discovery Protocol
30Unicast Discovery Protocol
Request Message (sent via TCP Unicast)
31Unicast Discovery Protocol
Request Message (sent via TCP Unicast)
Response Message (sent via TCP Unicast)
32Lookup
- 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
33Local 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
34Remote 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
35Transactions
- Provide ACID properties
- Implemented by a transaction manger
- Transaction participants
- Prepare
- Commit
- Abort
- PrepareAndCommit