Newsletter sign-up
View all newsletters

Sign up for our technology specific newsletters.

Enterprise Java
Email Address:

Jini technology, out of the box

  • Digg
  • Reddit
  • SlashDot
  • Stumble
  • del.icio.us
  • Technorati
  • dzone

Page 2 of 5

To perform a task, a Jini technology-enabled client (a program, service, or user) enlists the help of services. For example, a client program might upload pictures from the "image storage service" in a digital camera, download the pictures to a "persistent storage service" offered by a disk drive, and send a page of thumbnail-sized versions of the images to a "printing service" of a color printer. In this example, the client program builds a federation consisting of itself, the image storage service, the persistent storage service, and the color printing service. The client and services of this federation worked together to perform the task: to offload and store images from a digital camera and print out a page of thumbnails.

Jini technology consists of a programming model and a runtime infrastructure. The programming model helps you build a distributed system organized in the Jini technology way: as a federation of services and client programs. The runtime infrastructure resides on the network and provides mechanisms for adding, subtracting, locating, and accessing services as the system is used. Services use the runtime infrastructure to make themselves available when they join the network. A client uses the runtime infrastructure to locate and contact desired services. Once the services have been contacted, the client can use the programming model to enlist the help of the services in achieving the client's goals.

Jini technology's runtime infrastructure

The runtime infrastructure of Jini technology resides in two places: in lookup services that sit on the network, and in the Jini software-enabled devices themselves. Lookup services are the central organizing mechanism for Jini technology-based systems. When devices are plugged into the network, they register themselves with a lookup service and become part of a federation. When clients wish to locate a service to assist with some task, they consult a lookup service.

Lookup services organize the services they contain into groups. A group is simply a set of registered services identified by a string. For example, the "Printers" group could be populated by the printing services offered by all the printers on the local network. The "East Conference Room" group could be populated by the services offered by all the devices in the East Conference Room (including, potentially, one or more members of the "Printers" group). As shown by this example, in which printing services could belong to both "Printers" and "East Conference Room" groups, a service can be a member of multiple groups. Moreover, multiple lookup services can maintain the same group (can store the group name and its services). This kind of redundancy can help make the Jini technology system more fault tolerant.

If the "Printers" group is maintained by multiple lookup services, for example, and one of those lookup services goes off the network, clients will still be able to locate the "Printers"" group via a different lookup service.

The runtime infrastructure enables services to register with lookup services through a process called discovery and join. Discovery is the process by which a Jini technology-enabled device locates lookup vservices on the network and obtains references to them. Join is the process by which a device registers the services it offers with lookup services.

  • Digg
  • Reddit
  • SlashDot
  • Stumble
  • del.icio.us
  • Technorati
  • dzone
Comment
Login
Forgot your account info?
Add comment
Anonymous comments subject to approval. Register here for member benefits.
Have a JavaWorld account? Log in here. Register now for a free account.
Resources