JINI Presentation

Download Report

Transcript JINI Presentation

Nandakumar
JINI



Jini is a layer atop JAVA like JFC or
JDBC.
Jini basically offers api’s for
programming in a distributed
environment.
The Jini project was initiated to extend
Java for what it was originally
developed for.
JINI…



Jini is not a acronym for juniper internet
communications inc. (as they claim)
Jini is a new computing paradigm
Java was actually developed for running on
embedded applications before it became a
programming language for the web.
Vision of the Jini Project

The design group had the following
vision in mind:
“Network Anything Anytime Anywhere”
What Jini is not !!
1.
2.
3.
4.
It is not a name server.
It is not Java Beans or EJB .
It is not just RMI.
It is not a distributed Operating
System.
What ties JINI with DS ?
Jini is used to create a platform where in
different diverse systems all can “talk” to
each other.
It signals a change from a world in which
devices are just networked into one in which
devices join together to form a true
distributed system.
Jini design goals:



Software infrastructure should be
incredibly robust.
Must be really Plug & Play.
The software system for the internet
must be evolvable.
What we are actually looking
for:


Jini was developed for multi process –
multi devices environment.
We are basically looking for different
devices interacting to provide different
results , what we require is a generic
platform to provide capabilities for
interactive programming.
Jini development:

Jini can be considered as an extension
to RMI.( we dealt this in the Cookie
server /client model).
rmi
RMI-remote method invocation provides
a way for Java applications, running on
different JVM’s/host computers to “talk” to
each other.
Jini’s Key Concepts
1.
2.
3.
4.
5.
Discovery.
Lookup.
Leasing.
Remote Events.
Transactions.
Jini To work requires ….
3 major components
 Service
 Client
 Jini environment –rmi, web server,
lookup service.
Service



Devices that can share their capabilities
with other devices.
Device requirements
a. memory & cpu.
b. Connection to network.
E.g. TV, Microwave,Printer,PC,Software
Client


A device that uses services
Requirement



Memory & CPU
Connection to Network
E.g. PDA, WAP Phone, PC, Coke
Machine
The Jini environment
Service
Provider
Service
Consumer
Jini Lookup
Service
How does it work?



1.create the jini environment-lookup
server online.
2.services discover, join and register on
lookup servers.
3.clients discover and find matching and
downloadable services, then start using
them.
Creating The jini environment:



1.run a http server (jini provides a
simple but efficient one).
2.run a RMI daemon (exists on Java 2).
3.run a lookup server (supplied with the
reggie.jar files in jini){ comes with the
jini env}
Running the environment
command lines:
http server:
 java -jar
java archive
 /usr/local/Java/jini1_1/lib/tools.jar. jini’s http
-port 8087
 -dir /usr/local/Java/jini1_1/lib
the server’s root
directory

-verbose&
 Rmi daemon:
 rmid -J-Dsun.rmi.activation.execPolicy=none
 -port 1100
 -log /tmp/rmid_log&
rmi log directory-recvering...

SAMPLE PROGRAM OUTPUT!






From the service:
>discovered a lookup service!
>set serviceID to e91bb-53434-ty7554
From the client:
>Got matching service.
>Its message is: Hello, world!
Advantages & shortfalls




Uses java as the base.
Support with all available java tools.
Not all that easy to code.
Uses RMI which adds its overhead.