October 27, 2016
Hot Topics:

Jini released from its magic lamp

  • February 10, 1999
  • By Kieron Murphy
  • Send Email »
  • More Articles »

Sun Microsystems has officially released Jini 1.0. The new technology promises to provide an architecture that lets network-connected devices using Java-based apps communicate with one another automatically.

Sun has pinned a lot of its hopes for the future of a networked electronics world -- from computers to everyday appliances -- on this culmination of the well-known Java vision. In its goal of "write once, run anywhere," the "run anywhere" part is no more apparent than it is in Jini.

So what is Jini, and where does it want to go tomorrow?

First, we'll take a look inside its special lantern. Then we'll hear from the divines who have peered into its days ahead and are ready to auger.

The creators of Jini (pronounced 'jee-nee') have described it in this way: "Built on top of a Java software infrastructure, Jini technology enables all types of digital devices to work together in a community put together without extensive planning, installation, or human intervention. Each device provides services that other devices in the community may use. These devices provide their own user or programmatic interfaces, which ensures reliability and compatibility."

Java inside

Except for the mention of Java, this sounds as if Sun could have cribbed this description from a 1964 World's Fair tape. But then, Java is what makes the hype actually happen with Jini.

This is how it works. Jini offers Java class libraries for programming "services" across any network of processors using a Java VM -- a so-called "federation" of machine and app "resources."

"By leveraging Java, Jini provides simple distributed computing."
-- Bill Joy, Sun Microsystems

It does this, according to the folks at Sun, by taking advantage of the Java language's remarkable combination of scalability and simplicity.

"By leveraging Java, Jini provides simple distributed computing," Bill Joy, Sun co-founder and chief scientist told us. "We took the time to make it simple, and to identify a few basic concepts that are appropriate for distributed computing -- remote objects, leasing, two-phase commit, events, and distributed security -- [and] that we could teach Java programmers in just a couple of days to become Jini programmers." He added that because Java developers can easily become Jini developers, they have "a huge head start on this."

Joy said he believes Jini will be a vital technology for what is variously called "pervasive computing" or "ubiquitous computing."

Building a federation

Here's what you should have to get started with Jini:

  • A Java 2 VM -- which includes Remote Method Invocation (RMI) enhancements needed by Jini
  • The Jini Starter Kit (see link in resources section)
  • A lookup service, or database for services available in the federation (an implementation is provided with the starter kit)
  • A discovery service, a protocol based on IP (unicast TCP and multicast UDP)
  • A properly functioning IP network.

No transaction processing manager is needed to use Jini technology, according to Sun. But if you want to use the distributed transaction services of Jini, you must have a transaction manager service running. Again, an implementation of this service is included with the Jini Starter Kit, though services can use whatever transaction manager they find appropriate.

(Jini's distributed security framework is based on RMI and Java 2 platform security -- a strong, capable model that applies equally to any Java-based program. Access Control Lists for Jini are in the works.)

From this, the programming model follows. Jini services use these primary conventions:

  • Distributed leasing provides a time-based model for activating and freeing services and resources.
  • Transactions allow wrapping of multiple operations on multiple services into a single unit of work that either completely succeeds or is rolled back.
  • Distributed events are a notification mechanism between services and resources that stretches beyond machine boundaries.

(Other key aspects of the programming model include: the Jini device specification, RMI, Object Serialization, and JavaSpaces. You will need to understand some of these specifications and provide implementations to interface methods to be able to write a service. Scads of documentation on the Jini programming model can be found on Sun's Web site.)

With a Jini infrastructure in place and a basic understanding of the programming model under your belt, you are ready to write services.

As EarthWeb's regular contributor Apu Shah explained recently, these can be aimed directly at machines, such as storage devices, or can be quite generic and provide a range of methods, much as class libraries do. ("In fact, you could have all computation-intensive code packaged in a service on a large machine where these methods execute most efficiently," he commented. "This truly unleashes the power of distributed computing.")

Sun offers the following examples of Jini services:

  • A printing service to print from Java and legacy apps
  • A JavaSpaces service for simple communication and storage of related groups of Java objects
  • A transaction manager to let groups of objects participate in the Jini Transaction protocol defined by the programming model.

(Collections of Jini services are referred to as "djinns.")

The code for Jini falls under the new Sun Community Source License (SCSL) program. You can freely download (all whopping 35,000 lines of) it from Sun's site.

Jini's believers

Quite a lot has been written to date about Jini technically [see resources below]. So, in this section, we will look at its possibilities in the minds of its most ardent followers.

"Jini makes the concept of 'plug and play' really work."
-- Anne Thomas, Patricia Seybold Group

To begin, we asked leaders in the Java community to offer their analyses of Jini's strengths.

Shah, who is director of software operations at Boston Education and Software Technologies, based in Mumbai, India, said: "Jini stands to provide a significant contribution to the networked world. With the service-based architecture that Jini provides, the greatest promise is that of spontaneous networking and availability. Simply adding a service implementation or plugging in a device to the network exposes the service to all clients in the Jini federation. No more configuration hassles, no more installation hassles, no more administration hassles. Clients become aware of new services and devices as they are added to the federation. Clients can use these services without having knowledge of where the service is located or how the service is implemented. It's seamless and transparent to the client. This is Jini's key strength."

Anne Thomas, an industry analyst with the Patricia Seybold Group, in Boston, agreed with Shah that the new technology's strong suit is its spontaneous networking capability.

"It's really hard to make your PC talk to other types of devices," she explained. "You need to load the right device driver -- if you can find it -- and somehow make sure that the new device doesn't collide with some other device that you have defined to your machine. Jini makes the concept of 'plug and play' really work. Now imagine that you want to create a network of electronic devices in the home. Most households wouldn't be willing to hire a network administrator to set up and maintain the at-home network. Without a working plug-and-play technology, networked homes will never exist. Some type of technology like Jini is essential to the success of the home network."

Tim Rohaly, a software mage at the MageLang Institute, located nominally in San Francisco, said the key strength of Jini technology "is clearly the Java 2 platform itself."

"[Jini] has the potential to be everywhere, in everything, and deliver the quality of service expected from consumer devices but sorely lacking in the predominant computing platforms of today," he continued.

Rohaly said that when it comes to programming for devices, this usually means the use of expensive, proprietary, arcane environments that require specialized training and are not compatible with one another. "Java changes all that with APIs that span the range from smart cards to SMP machines," he explained. "Capabilities inherent in Jini would be difficult, if not impossible, to implement in some other languages. Jini takes advantage of Java's ability to build program capabilities by dynamically assembling objects from across a network."

Page 1 of 2

Comment and Contribute


(Maximum characters: 1200). You have characters left.



Enterprise Development Update

Don't miss an article. Subscribe to our newsletter below.

Sitemap | Contact Us

Thanks for your registration, follow us on our social networks to keep up-to-date
Rocket Fuel