Jini Network Technology
What is JiniTM Network Technology?
Jini network technology, or simply Jini, is based on Java and provides facilities for easily and immediately offering new services on a network. An example of such a service would be a "printer" service that makes a printer available to clients (users) on the network.
Suppose, for example, a new color printer is to be installed on a LAN. In the traditional scenario, once the printer has been installed on the network, the appropriate printer driver must be installed on all the client (user) computers from where the printer is to be used. Some issues with the traditional scenario are:
- The printer cannot be used from a client computer without installing the driver.
- The client computer must be told of the location of the printer.
- If the printer is moved to another location, then an appropriate change must be made to the settings on each client computer, possibly requiring a reinstallation of the driver.
- If the printer is replaced with a different model, say one with enhanced capabilities, the printer driver for the new printer must be reinstalled on all the client computers.
- A user who does not know about the color printer will not be able to use it.
With Jini, the story is different. Jini provides a "plug-and-play" architecture.
As soon as the color printer (which must be Jini enabled) is installed on the network, each user can access it automatically and immediately. All appropriate software needed to use the printer, including the printer driver, is automatically available to all Jini-enabled computers on the network. Relocation of the printer or replacing it with a new model does not have any adverse effect on the user.
Jini was developed by Sun Microsystems, Inc.
A Jini service is defined as an entity that can be used by a software program, a computer, a device, another service, or a human (via a user interface).
Some examples of services are those that allow access to
- software applications,
- devices such as cameras and home appliances,
- storage systems such as network attached storage appliances,
- CD burners,
Underlying the service concept are the following notions:
- Service registration: Every new service must register itself to allow users to find and use it.
- Service lookup: Enables users to find the service.
- Service proxy object: a Java object that specifies service capabilities and contains Java code that allows a client computer to use the service.
The core of the Jini consists of three protocols:
- Discovery protocol: Used to find the "lookup" services on the network, which are used to register a new service or to find a service.
- Join protocol: Used for registering a new service.
- Lookup protocol: Used by client devices to find a needed service.
Jini provides facilities such as those for
- Service registration: A new service registers itself by first finding the Look Up Services (LUSs) on the network (say by multicasting, i.e., restricted broadcasting) and then sending these LUSs a "service proxy" object. This object, which is a Java object, provides an API (application programming interface) that can be used to determine the functionality of the service and for using the service itself. The service proxy object also contains code that implements the above API to query and use the service.
- Service discovery: A client computer finds a desired service with the appropriate functionality by contacting the LUSs. Incidentally, not all LUSs may know about all the services.
- Service use: If an appropriate service is found, the corresponding service proxy object is automatically downloaded to the client computer from the LUS.
- Service removal: A service is removed by removing the associated service proxy object from the LUSs.
Clients use a Java interface to interact with the proxy object to query and use the service. The proxy object may also provide a user interface, such as a GUI to allow a human being to interact with a device, e.g., to manipulate a camera hooked into the network.
Note that when a new service registers itself, it must specify the period, the lease time, for which it will be available. Before the expiry of this period, the service must renew its lease. Otherwise, it will be automatically removed from the network.
Let us go back to our printer example. After the printer (which must be Jini-enabled) has been plugged into the network, it takes the following steps to register itself as a service:
- Discover: To register on the network, the printer finds the LUSs on the network.
- Join: The printer then sends each LUS a printer proxy object. This object knows about the functionality of the printer and knows how to communicate with it.
Once the printer service has been registered, using it involves the following steps:
- Discover: To use the printer service, the client finds the LUSs on the network.
- Lookup: The client then sends each LUS a request specifying the kind of printer service it wants.
- Receive: If the requested service is available, the client receives a printer proxy object from the LUS. This object allows the client to use the new printer without having to pre-install a printer driver because the object brings with itself the printer driver code.
- Use: Client uses the printer by means of the printer proxy object.
What are the Advantages of Jini?
Jini makes it easy to install and use services, and reduces operating costs for the following reasons:
- It is easy to add and remove services.
- Services can be relocated on the network without affecting users.
- Services are available immediately and are found automatically.
- The Jini architecture is scalable.
Using Jini requires that devices and computers be Jini enabled, i.e., they must have the appropriate Java code and be able to run it.
Where Can I Find More Information?
TM Jini is a registered trademark of Sun Microsystems, Inc.