Seminar Document
Seminar Document
On
JINI TECHNOLOGY
Submitted in partial fulfillment of the requirements for the award of the Degree of
BACHELOR OF TECHNOLOGY
in
COMPUTER SCIENCE AND ENGINEERING
by
E.NAVYA
( 17FE1A0538 )
1
DEPARTMENT OF COMPUTER SCIENCE AND ENGINEERING
VIGNAN’S LARA INSTITUTE OF TECHNOLOGY AND SCIENCE
(Affiliated to Jawaharlal Nehru Technological University Kakinada, Kakinada)
(An ISO 9001:2008 Certified Institution, Approved by AICTE)
Vadlamudi, Guntur Dist, Andhra Pradesh-522213 April - 2020.
CERTIFICATE
This is to certify that the seminar report entitled “JINI TECHNOLOGY” is a bonafide work
done by E. Navya ( 17FE1A0538 ) submitted in the fulfillment of the requirements for the
award of the degree of Bachelor of Technology in COMPUTER SCIENCE AND
ENGINEERING from JAWAHARLAL NEHRU TECHNOLOGICAL UNIVERSITY,
KAKINADA. The work embodied in this seminar report are not submitted to any other
University or Institute for the award of any Degree or Diploma.
2
ACKNOWLEDGEMENT
The satisfaction that accompanies with the successful completion of any task would be
incomplete without the mention of people whose ceaseless cooperation made it possible, whose
constant guidance and encouragement crown all efforts with success.
I thank Mr. T. V. VAMSI KRISHNA, Assistant Professor & HOD, Department of Computer
Science and Engineering for support and Valuable suggestions.
I also express my sincere thanks to our beloved Chairman Dr. LAVU RATHAIAH for
providing support and stimulating environment for submitting the seminar report.
I also place my floral gratitude to all other teaching and lab technicians for their constant
support and advice for submitting the seminar report.
E. Navya ( 17FE1A0538 )
3
DECLARATION
I, E. Navya, hereby declare that the seminar report entitled “JINI TECHNOLOGY” is a record
of an original work done by me under the guidance of Dr. K. Venkateswara Rao Associate
Professor, of Computer Science and Engineering. This seminar report is submitted in the
fulfillment of the requirements for the award of the Degree of Bachelor of Technology in
Computer Science and Engineering. The results embodied in this seminar report are not
submitted to any other University or Institute for the award of any Degree or Diploma.
4
INDEX
1. ABSTRACT ----------------------------------------------------------------------------7
2. INTRODUCTION OF JINI-----------------------------------------------------------8
3. HISTORY OF JINI --------------------------------------------------------------------9
4. WHAT IS JINI -----------------------------------------------------------------10
5. WORKING OF JINI ----------------------------------------------------------11
5.1 SERVER-SIDE PROCESSING------------------------------------11
5.2 LEASING OF SERVICE--------------------------------------------12
6. ADVANTAGE OF JINI TECHNOLOGY ---------------------------------13
7. DISADVANTAGE OF JINI TECHNOLOGY ----------------------------14
8. GOALS OF JINI ---------------------------------------------------------------15
9. JINI PROCESS -----------------------------------------------------------------16
10. JINI ARCHITECTURE ------------------------------------------------------17
11. COMPONENTS OF JINI ----------------------------------------------------19
11.1 SERVICES ----------------------------------------------------------19
11.2 LOOKUP SERVICES ---------------------------------------------19
11.3 DISCOVERY AND JOIN -----------------------------------------20
11.4 EXTENDED RMI --------------------------------------------------21
11.5 LEASING ----------------------------------------------------------- 21
11.6 TRANSACTION ---------------------------------------------------22
11.7 JAVA SPACES -----------------------------------------------------23
11.8 DISTRIBUTED SECURITY ------------------------------------ 24
11.9 DISTRIBUTED EVENTS --------------------------------------- 25
12. REQUIREMENTS OF JINI -------------------------------------------------27
13. EXAMPLE OF JINI ----------------------------------------------------------28
14. APPLICATION OF JINI -----------------------------------------------------29
15. CONCLUSION ----------------------------------------------------------------31
16. REFERENCES ---------------------------------------------------------------- 32
LIST OF FIGURES
Any kind of network made up of services (applications, database, servers, devices, printers,
storage, etc.) and clients(request of services) of those services can be assembled, disassembled, and
maintained on the network using Jini Technology. Services can be added or removed from the
network and new clients can find existing services.
Jini technology is architecture for construction of systems from objects and networks. The
Jini architecture lets programs use services in a network without knowing anything about the wire
protocol that the service uses.
One line implementation of a service might be XML-based and another RMI-based, third
CORBA-based. The client is, in effect, taught by each service how to talk to it. A service is defined by
its programming API, declared as a Java programming language interface
2.INTRODUCTION OF JINI
• Jini is a simple set of Java classes and services that has the potential to create its own
revolution because it allows technology to be exploited in new ways.
• Created by Sun Microsystems as software for networking in all sorts of electronic devices,
services, and applications, Jini lets them join up easily, seamlessly and gracefully - it is a sort
of plug-and-play capability for spontaneously forming networks of heterogeneous equipment
to share code and configurations transparently.
• And Jini has the potential to radically alter our use of computer service networks, since it
allows and encourages new types of services and new uses of existing networks.
• Services can be added or removed from the network and new clients can find existing services.
3.HISTORY OF JINI
The idea of the Jini system was invented by Sun cofounder Bill Joy at Sun Aspen
Small works R&D lab in 1994.
Sun introduced Jini in July 1998. In November of 1998, Sun announced that there were
some firms supporting Jini.
The word 'jini' means "the devil" which is the origin of the English word 'genie'. On
January 25, 1999, Jini was officially launched and the technology is available for download. In
September 1999, 18,000 click-thru agreement /downloads of Jini release from Sun’s web site
4.WHAT IS JINI
Jini is a set of specifications that enables services to discover each other on a network and
that provides a framework that allows those services to participate in certain types of operations. For
an instance, take a Jini-enabled laptop into a Jini-enabled conference room and the laptop
automatically be able to find and use the services of the conference room such as the laptop will
automatically find the printer inside the room, seamlessly download any drivers required by the
printer and will send its output to the printer. But Jini is not about hardware and devices. Jini is all
about services.
A Jini-enabled printer provides a print service to the network; that the particular service is
provided by a piece of hardware is irrelevant. There may be a software service on the network that
also provides the same print service by accepting print requests, rasterizing them and
emailing the rasterized images to a distant recipient. There are many services that are only software.
Thus Jini not only allows hardware and applications to interact but also allows this
interaction to happen in a dynamic, robust way. Jini software also gives network devices self-
configuration and self-management capabilities. It lets devices communicate immediately on a
network without human intervention. And Jini has the potential to radically alter our use of
computer service networks, since it allows and encourages new types of services and new uses of
existing networks.
These networks are self-healing in that devices that leave the network for any reason,
such as machine crashes or power surges, do not affect the remaining devices' operation. A Jini
client that loses contact with a server can recover and continue processing. It is precisely these
features that make Jini technology ideal for embedded systems in a dynamic environment. But
network plug-and-play capabilities and self-configuration are also attractive for enterprise systems.
5.WORKING OF JINI
The first action of a Jini-enabled device after connecting to the network is locating the
Lookup service, which resides on a server in a network. It accomplishes this by using the discovery
protocol, which is multicast-based.
For this, a device first sends a message to every other Jini device on the network that is
within a certain number of network hops. When the Lookup server receives this broadcast
request, its returns its address to the Jini client, which stores the address as its link to the Lookup
server.
The client thereafter sends requests to the Lookup server directly to this address.
Similarly Jini servers offering services uses the discovery protocol, which is multicast-based, to find
a Lookup Service and then uses the join protocol to register and thus become available to client
applications. A Jini client asks the Lookup service for a list of Jini servers that match the requested
attributes. It is then up to the Jini client to select the specific Jini server from the returned list.
Similarly Jini servers offering services uses the discovery protocol, which is multicast-
based, to find a Lookup Service and uses the join protocol to register and thus become available to
client applications. Services may join multiple lookup servers for increased reliability. Once clients
and services are paired up, they no longer need the Lookup Service's assistance and can work
together directly.
The primary job of a Lookup service is to act as a central market for Jini services
scattered around the network, grouping similar ones together and making them accessible to
client application programs. The Lookup service maintains the maps between each Jini service and
its attributes
A unique feature of Jini technology is its ability to transfer executable code between Jini
devices. This capability is similar to Java applets, which execute on Web browsers. With applets,
Web servers download an entire applet executable code to the client, which executes the code.
In contrast, Jini software sends only the code for the interface that the client uses to
communicate with the server; the rest of the program remains in the server and actually executes there.
Thus, in a way, Jini server teaches the Jini client how to communicate with it. This strategy
mitigates one of the biggest problems with Java applets: their slow speed. The system downloads
less because a Jini network usually only transfers the results of whatever code the server executes.
When a client accesses a resource through a service, it leases that service. A lease is a
guarantee that the client may access that resource for a specific length of time. The client has the
option of renewing the lease before its expiry.
If suppose the service does not receive an extension request within the alloted period of time,
the resources may be allocated for other clients. This prevents a network or client failure from
keeping an indefinite lock on the resource. A nonexclusive lease permits other clients also to access
the service at the same time. A lease could be exclusive, allowing only one client to access a
resource at any time.
6.ADVANTAGES OF JINI
A jini system is a distributed system based on the idea of federating groups of users and
the resources required by those users. The overall goal is to turn the network into a flexible, easily
administered tool on which human and computational clients can find resources. Resources can
be implemented as either hardware devices, software programs, or a combination of the two. The
focus of the system is to make the network a more dynamic entity that better reflects the dynamic
nature of the workgroup by enabling the ability to add and delete services flexible.
When you plug a new Jini-enabled device into a network, it broadcasts a message to any
lookup service on the network saying, in effect, "Here I am. Is anyone else out there?" The
lookup service registers the new machine, keeps a record of its attributes and sends a
message back to the Jini device, letting it know where to reach the lookup service if it needs help. So
when it comes time to print, for example, the device calls the lookup service, finds what it needs
and sends the job to the appropriate machine. Jini actually consists of a very small piece of Java code
that runs on your computer or device.
Jini is a set of APIs and network protocols that can help you build and deploy distributed
systems that are organized as federations of services. A service can be anything that sits on
the network and is ready to perform a useful function. Hardware devices, software,
communications channels -- even human users themselves can be services.
A Jini-enabled disk drive, for example, could offer a "storage" service. A Jini-enabled
printer could offer a "printing" service. A federation of services, then, is a set of services, currently
available on the network, that a client (meaning a program, service, or user) can bring together to help
it accomplish some goal.
Jini defines a runtime infrastructure that resides on the network network; in the service
providers (such as Jini-enabled devices); and in clients. Lookup services are the central organizing
mechanism for Jini-based systems. When new services become available on the network, they register
themselves with a lookup service. When clients wish to locate a service to assist with some task, they
consult a lookup service.The runtime infrastructure uses one network-level protocol, called
discovery, and two object-level protocols, called join and lookup .Discovery, illustrated in the middle
of Figure 1, enables clients and services to locate lookup services. Join enables a service to register
itself in a lookup service. Lookup enables a client to query a lookup service for services that can help
the client accomplish its goals.
Discovery works like this: Imagine you have a Jini-enabled disk drive that offers a
persistent storage service. As soon as you connect the drive to the network, it broadcasts a presence
announcement by dropping a multicast packet onto a well-known port. Included in the presence
announcement is an IP address and port number where the disk drives can be contacted by a lookup
service.
Lookup services monitor the well-known port for presence announcement packets. When
a lookup service receives a presence announcement, it opens and inspects the packet. The packet
contains information that enables the lookup service to determine whether or not it should contact
the sender of the packet. If so, it contacts the sender directly by making a TCP connection to the IP
address and port number extracted from the packet. Using RMI, the lookup service sends an object,
called a service registrar, across the network to the originator of the packet.
The purpose of the service registrar object is to facilitate further communication with the
lookup service. By invoking methods on this object, the sender of the announcement packet can
perform join and lookup on the lookup service. In the case of the disk drive, the lookup service
would make a TCP connection to the disk drive and would send it a service registrar object, through
which the disk drive would then register its persistent storage service via the join process.
11.COMPONENTS OF JINI SYSTEM
11.1 SERVICES
• A service can be anything that sits on the network and is ready to perform a useful function.
Hardware devices, software, communications channels – even human users themselves -- can be
services.
• Services may be added or withdrawn from a Jini federation at any time.
• Jini provides mechanisms for service registration, lookup and use.
• Services communicate by using a service protocol = set of Java interfaces.
• Set of services is open-ended.
11.2 LOOKUP SERVICE
• Lookup Services are the central organizing mechanism for Jini-based systems and provide
mapping of interfaces to objects. Lookup enables a client to query a lookup service for services
that can help the client accomplish its goals.
• Hierarchical Lookup: Lookup service may include entry for other lookup services. When new
services become available on the network, they register themselves with a lookup service.
• When clients wish to locate a service to assist with some task, they consult a lookup service
The runtime infrastructure uses one network-level protocol, called discovery, and two object-
level protocols, called join and lookup.
11.3 DISCOVERY AND JOIN
• Discovery is the protocol by which Jini services register themselves with a lookup service.
• Discovery or Lookup is performed by doing a multicast (to find all lookup services) or unicast
(when you know the machine on which the lookup service is running) lookup. Jini™ enabled
Object (representing a hardware and/or software service) multicasts a packet with a reference to
itself.
• The service receives RMI reference to Lookup service (one or more).
• The service joins a federation by placing an object representing capabilities into the Lookup
service for other clients and services to use for a period of time.
• Discovery enables clients and services to locate lookup services.
• Join enables a service to register itself in a lookup service.
Activation
Multicast
Replication
11.5 LEASING
• A lease is a grant of guaranteed access over a time period.
• Each lease is negotiated between the user of the service and the provider of the service as part of
the service protocol.
• A service is requested for some period; access is granted for some period, presumably taking the
request period into account. Leases in term of duration (relative time).
– lookup service needs to use resource to maintain registration.
11.6 TRANSACTION
The JavaSpaces technology is written in the Java language and is a simple, fast and unified mechanism
for dynamic communication, co-ordination and sharing of objects.
• In a distributed application, JavaSpaces technology acts as a virtual space between
providers and requestors of network resources or objects.
• participants in a distributed solution can exchange tasks, requests information in the form of
Java technology-based objects.
• JavaSpaces technology provides developers with the ability to create and store objects with
persistence.
Figure: 11.5 Jini JavaSpaces
• 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.
• Services themselves may request access to other services based on the identity of the object that
implements the service. Whether access to a service is allowed depends on the contents of an
access control list that is associated with the object.
• Security plays an important role in distributed systems. The Jini security model is based on the
JDK 1.2 security system.
11.9 DISTRIBUTED EVENTS
• Jini supports distributed events.
• An object may allow other objects to register interest in events in the object and receive a
notification of the occurrence of such an event.
• Uses the Observer pattern and sensitive to network issues – delays,disruptions etc.
• Serializable and can be moved across a network.
• Most useful in observing service changes – lookup services going up or down etc.
• Enables distributed event-based programs to be written with a variety of reliability and
scalability guarantees.
For this system to work, the marketplace must first be set up by placing a Jini Lookup
Service, a simple piece of application software, on one or more hosts in the network. There can be
more than one Jini Lookup Service in a system. Services seeking a market for their wares send
discovery requests to multicast request servers for Jini Lookup Services. Upon hearing such a
request, an interested Jini Lookup Service initiates a private conversation with the service to
establish its joining in the market.
When the service and the Lookup Service first converse as part of this joining process, the
Lookup Service promises the newcomer space in its market. In return, the service gives the Lookup
Service basic information with which client applications can establish a connection to it. The
information here is a software interface through which a Jini client can interact with a Jini service.
Client applications ask Jini Lookup Services for certain type of services. The client does this
by sending a template file - a generic description of the desired service to the Jini Lookup Service.
The Jini Lookup Service responds with a list of candidates that match the template from which the
client may select a particular service. Thus Jini supplies the infrastructure for marketing a set
of services, as well as provides the programming model by which resources may form impromptu
groups called Jini federations and provide their services to users and other resources.
When a Jini-capable program that is a client application needs a service such as, say printing, it
requests that the Jini Lookup Service send it a list of potential printer services. From the lists provided,
the client selects one or more randomly, algorithmically or even manually through a user interface. For
the selected service provider, the Lookup Service delivers the corresponding piece of executable Java
byte code. While most typically this byte code would simply implement communications between the
service and the client program.
13.APPLICATION OF JINI
• Managing a Printer:
The particular example shows how alarms are forwarded from the Jini technology-
enabled resource to the network management platform, and what actions are taken. First, the printer
is connected to the network.
Through the Jini technology and the Java Dynamic Management kit, the printer is
discovered and automatically appears on the map on the network management platform.
Second, the system administrator, via a pop-up window on the network management platform,
accesses the Jini technology-based lookup server directory to recover the management application
from the printer.
Finally, when a problem arises, and a corresponding alarm is generated. One example might be
"job too big." When this occurs, the job is cancelled from the network management platform, via the
pop-up printer management application, and the owner warned of the cancellation. In addition,
statistics on printer usage.
• Managing NT server:
A second example often sited is managing an NT server. As shown in Figure 4, using the Jini
technology-based lookup service, the system administrator discovers the NT server BIOS as the NT
server is booted, and adds it to the map on the network management platform. When the inevitable
server crash occurs, a corresponding alarm is generated to the network management platform.
Then the system administrator again uses the lookup service directory, this time
to recover the management application from the NT server. Finally, a patch is downloaded to the
NT server, using the management application. The NT server is rebooted, using the management
application. When the NT server is finally up and running, a cancellation alarm appears on the
network management platform acknowledging things have returned to normal.
15.CONCLUSION
Jini's promise is not limited to the domain of network devices. It can be expanded
to scanners, printers, phones, radios etc. Jini provides an extensive framework for developing
flexible and robust distributed systems. It also deals with network failures better than the
traditional object-based distribution solutions, because of its powerful and careful interface
design.
It seems that Jini is quite adaptable to these other solutions because of its flexible nature, but there
is a lot of competition going on between vendors like, for instance, Sun Microsystems and
Microsoft Corporation. The worst scenario is that the techniques of these competing vendors try to
drop each other out from the market instead of trying to complement each other. In this kind of
competition, the best technology cannot always survive.
More discussion about this rigid competition can be found in. Some research is already ongoing
related to the complementing issues, and the results seem to be very promising , especially with Jini
and SLP .In addition to the solutions for the challenges of distributed computing, Jini offers
capabilities, which are required to fulfil the needs of modern end users of the network services.
Flexibility and spontaneity are the most important issues, which are possible to deploy, if a
Jini based system is designed in a sophisticated way. As the degree of distribution of the servi-ces
grows all the time, security issues are also very important. In this area, the developers of Jini still
have a lot of work to do, because Jini does not provide any security mechanisms in addition to
the basic java environment properties.
16. REFERENCES
• www.google.com
• www.wikipedia.com
• www.SeminarSlide.com
32