what if … there was a true distributed programming model? jini
TRANSCRIPT
• Spontaneous networking• Federation• Services• Discovery
Simply put, connect anything at anytime, anywhere
What is Jini? Key Concepts
Public Internet
Corporate Internet
Firewall
WorkgroupWorkgroupServerServer
WebServerTelco
Server
Pager
Cell Phone
Thin Client
Thin Client
PDAPDA
NT Workstation
Solaris Workstation
Solaris Workstation
VideoServer
Current Enterprise Reality
Jini Technology Introduction
• Invented by Sun Microsystems, 1999• Service-oriented framework for creating reliable distributed
applications• Designed with the network in mind• Provides a spontaneous, self-healing environment• Moves the Java platform to the network• Infrastructure and a programming model
Properties of Distributed Systems
• The following assumptions do not hold in distributed systems:• Networks are reliable• Remote systems are fault-free• Network latency is zero• Bandwidth is infinite • One administration domain• Systems are homogeneous
• Successful systems must address these.
Service-oriented view
• Everything is a service on the network• Hardware, software, etc.
• Services are represented by interfaces• Only functionality not implementation matters to clients• Implementation is a private business
• In Jini, services are described by Java interfaces• Programs understand programs best• Provides strong typing• Proven programming model
Spontaneous networking
• Jini enables clients to automatically discover services at runtime• Associative search
• Not by name lookup (e.g. http://some.url:port)• Instead: find a service that does this or that
• Loose coupling• Services and clients can join and leave the system (Jini federation)
at any time without causing system failure
Sparc PPC x86
Solaris Mac Windows
Java Java Java
Lookup
Java Spaces Other Services
Jini
NetworkServices •••
Discovery/Join
RMI
Jini Overview
The role of the proxy
• The proxy is a Java object downloaded from the service
• provides service or• transparently transfers
method calls to the remote service
• Hides implementation and communication details• Protocol independent (TCP/IP, HTTP, SOAP, etc.)
• Jini is 100% Pure Java
• Write once, run anywhere
• Wide industry acceptance
• Designed for building robust network apps• built on the Java standard RMI
“Jini.. a networked federation of Java virtual machines”
Jini and Java
RMI
Jini uses RMI for object-object communication
• Full object module support
• Pass any Java object and its code
• Works in any compliant JVM
• Easy to implement (i.e. automatic serialization)
• Provides foundation for addition of • multicast, replication and basic security
“RMI enables the simple, dynamic nature
of the networked Jini system”
Jini Architecture
Java
InfrastructureProgramming
ModelServices
RMI
Java VM
Security
LeaseDiscovery
EventLookup
Transaction
JavaSpaces
TX Manager
Java API’s
Beans...
Enterprise Beans
JNDI
JTS...
Extended Security
“Jini can be seen as an extension of the infrastructure, programming model, and services of Java”
Jini
Jini Infrastructure
Java
InfrastructureProgramming
ModelServices
RMI
Java VM
Security
LeaseDiscovery
EventLookup
Transaction
JavaSpaces
TX Manager
Java API’s
Beans...
Enterprise Beans
JNDI
JTS...
Extended Security
“The set of components that allow the building of a Jini system”
Jini
Discovery
• Allows Jini services (both HW and SW) to:
• Find and join a group of Jini devices
• Advertise its capabilities
• Provide any required SW and attributes
• Works with JVM-enabled or non-JVM devices
• Send out a multicast packet with reference to yourself
• Receive a RMI reference to the Lookup service
“Discovery solves the problem of finding the place to start in an unknown network”
Discovery in Brief
1. The device advertises and looks for a service
2. Lookup Servers run instances of thediscovery service which listen for multicast requests from discovering entities
3. The discovering entity performsa multicast that requestsreferences to the lookup service.
4. The lookup server calls a remote method on thediscovering entity’s exported object instance passing aremote reference to its lookup service as the parameter
Discovering Entity
Lookup Server
Lookup
• Repository of available services
• Stores service as an extensible set of Java objects• ID, interface, GUI’s, attributes, drivers ...
• Service objects downloaded to user as required
• May be federated with other Lookup services
• Lookup service interface:
• Registration, Access, Search, Removal
“The lookup service binds the federation together”
Distributed Security
• Extends the Java security model
• Identity carried in remote invocation
• Capabilities• Authentication• Integrity• Confidentiality• Delegation
“A simple model that minimizes
the impact of security on the developer”
Jini Programming Model
Java
InfrastructureProgramming
ModelServices
RMI
Java VM
Security
LeaseDiscovery
EventLookup
Transaction
JavaSpaces
TX Manager
Java API’s
Beans...
Enterprise Beans
JNDI
JTS...
Extended Security
“The set of interfaces that allow
the construction of reliable services”
Jini
Jini Services
Java
InfrastructureProgramming
ModelServices
RMI
Java VM
Security
LeaseDiscovery
EventLookup
Transaction
JavaSpaces
TX Manager
Java API’s
Beans...
Enterprise Beans
JNDI
JTS...
Extended Security
“Jini services provide simple solutions to complex problems faced by developers in the distributed environment”
Jini
Service Model 1
Proxy
Client
Hardware Implementation
Java VM
PrivateProtocol
Network
Service Client Service Provider
RMI
Service Model 2
Proxy
Client
Java VM
Service Client Service Provider
Dev 1 Dev 2 Dev 3JavaDeviceBay
RMI
PrivateProtocol
Service Model 3
Proxy
Client
Java VM
Service Client
Network Proxy
Dev 2 Dev 3
RMI
Dev 1
PrivateProtocol