With Jini, network configuration and maintenance is... so easy that
[it] allows impromptu network communities to exist. -- Scott Oaks
Services... can come and go, and the Jini infrastructure can deal
with those changes. -- Scott Oaks
A Jini service, defined by a Java interface, is a set of methods
that can be called upon to accomplish a task.
While Jini can provide the infrastructure allowing devices to work
together... there's no reason why these benefits need to be limited
to devices. -- Henry Wong
By the end of [Jini in a Nutshell], the reader can write a service
that can be fully activated.
Because Jini is a thin layer of Java code on top of the Java 2
Standard Edition platform, Java developers need to learn relatively
few new APIs.
While the current buzz around Jini centers on devices and device
connectivity, what people are actually doing with it is writing
software-based services in their enterprise.
Bill Joy always says, "Innovation will happen, and it will happen
elsewhere." -- Scott Oaks
|
Two Sun Insiders Talk about Jini
By Lori Houston
A definition of Jini
Jini is essentially a set of specifications to enable network
elements to discover each other and perform operations independently
in distributed environments. The idea of distributed computing is to
enhance overall network operations by spreading programs and data
around on multiple servers and computers. But there are a few headaches
inherent to distributed environments. Chief among these are
maintenance and configuration. In traditional client-server
networks, clients need to know where services and devices are located,
requiring a lot of intrusive administration, particularly when
something new is introduced to the network. And inevitably, network
elements fail, causing widespread interruption and necessitating frequent
intervention. Sun
Microsystems developed Jini to address some of these fundamental
problems.
"With Jini, network configuration and maintenance is very easy,"
says Scott Oaks, a Java technologist with Sun and the author of O'Reilly's
newly released Jini in a
Nutshell. "In fact, it's so easy that Jini allows impromptu
network communities to exist. Services and consumers of services can come
and go, and the Jini infrastructure can deal with those
changes without other network activities being interrupted or affected.
This is especially important in places where there is no such thing as
a system administrator: like a public conference room, your home, or an
airplane."
The Jini vision most commonly bandied about for the sake
of end-user or consumer understanding is the intelligent home network with
interacting devices and systems such as appliances, alarms, and lighting.
Within the enterprise, it's the idea of a laptop and a printer finding
each other on a network on their own and negotiating the appropriate print
driver.
"Device interoperability is a cool, useful piece, and everyone talks about
it because it's easily understood," Oaks says. If you talk about being able
to print automatically to a Jini-enabled printer without installing
drivers, then everyone has a conceptual understanding of Jini's benefits
because everyone's struggled with errant printers before."
A new way of thinking
But the essential idea of "services" actually speaks to much more than
appliances and printers. While Jini does provide the infrastructure
allowing devices to work together in a robust, impromptu manner without
intervention, there's no reason for these benefits to be limited to
devices. A Jini service, defined by a Java interface, is a set of methods
that can be called upon to accomplish a task.
The fact that Jini treats everything as a service has implications for
all programs and applications in distributed environments. "This
means that any and all services a developer has already written can be
wrapped inside of Jini services, and can access the benefits of
Jini--even something like a spell checker service that doesn't have
anything to do with a piece of hardware," explains Henry Wong, Oak's
co-author and colleague at Sun.
Jini's greater significance is that is represents
an utterly new way of thinking. "From a developer's perspective, Jini
requires them to think about dynamic and potentially unreliable
environments," Wong says. "The simple fact is that networks and services
will fail. Jini makes developers account for these possibilities in their
code, so they end up writing better programs."
The concept of services also opens the door to building intelligence into
networks using Jini. Current technology hasn't progressed quite to that
point yet, however. Although the core ideas behind Jini have been around
for a long time, the technology itself is still in the toddler
stage (to borrow an analogy from the Perl programming language's creator
Larry Wall).
"In some ways, Jini is very advanced, and in some ways, it's very
rudimentary," Oaks acknowledges. A lot of work has gone into basic Jini
APIs (application program interfaces) and infrastructure, building on
longstanding research. A very large and active Jini user community is
emerging, but because Jini is less than a year old, no one has finished
even a basic printer API yet. There's much more work to be done.
The Jini developer community
Like Java, work on
Jini is carefully regulated through Sun's brand of open source development,
the SCSL (Sun
Community Source License). Also like Java, Sun is propagating Jini
through a community of
independent developers cultivated outside of Sun. This grew
out of two Jini Community Summits held in Aspen, Colorado during 1999 and
presided over by Sun's chief scientist, Bill Joy.
Jini's framework is subject to the standard community process within Sun.
The larger Jini development
community is responsible for defining the common service definition
APIs. "This means that changes to the framework are developed in
conjunction with input from experts in the field," Oaks explains. "The
changes are then published in draft form, which goes out for public review.
After the review period, changes are made and the new specification is
published."
The upcoming
summit, offers interested developers a chance to learn exactly
what's happening with Jini development. In addition, the Jini community
will form a marketing council to help promote Jini and the
community's efforts. Scott Oaks will present
a
session on "Jini in the Enterprise."
What Jini in a Nutshell covers
With Jini in a
Nutshell, Oaks and Wong document Jini's basic services and
features while supplying incremental Jini programming information ranging
from basic to advanced.
"We cover it all!" Oaks declares. "We took an iterative approach in the
book: we start with a very simple service and client, and start building
Jini features into it. By the end of the book, the reader can write a
service that can be fully activated, that is persistent, and that leases
its resources to a client that is only periodically on the network," Oaks
says. "And in the mode of Java in a Nutshell,
there's an extensive API quick-reference section for the Jini APIs. We even
cover Jini 1.1, based on its current alpha draft."
Barriers to wider deployment
For Java developers, the barriers for assimilating Jini into their
repertoire should be fairly low, according to the authors. Because Jini
is a thin layer of Java code on top of the Java 2 Standard Edition
platform, Java developers need to learn relatively few new APIs. "Of
course, they must also learn to think about dynamic networks, so it's not
like learning about the java.lang.String class," Oaks adds. "Developers
who must also assimilate Java have a much bigger task than assimilating
Jini once they know Java."
The issue of approaching development differently is one of the barriers to
Jini's wider deployment in the IT industry. Underlying assumptions in
coding for distributed computing tend toward continuously functioning
networks and constantly available external administration. "It takes a
certain amount of discipline to think the opposite way: to program for
dynamic environments without system administration," Oaks says.
Other barriers keeping Jini from hitting the mainstream have to do with
lagging infrastructure to support the Jini vision. Device manufacturers
will need to incorporate special Java microchips to accommodate Jini, and
there is some delay in Java development necessary to successfully produce
those chips.
Competing technologies
Other technologies being developed in the same vein as Jini for
spontaneous device networking include Microsoft's Universal Plug-n-Play,
IBM's T-Spaces, and Hewlett-Packard's JetSend. Are these direct
competitors of Jini? "To the extent that those technologies are about
device integration and Jini is about more than that, they are not really
competing technologies," Oaks says. "On the other hand, they are all
trying to solve the same problem in the device space, and since they
aren't compatible, they end up competing."
Another technology of H-P's, e-speak, may be more conceptually comparable
to the Jini vision. The architects of e-speak describe it as a programming
interface for service providers and service users to assemble themselves
into dynamic federations where service policies can be expressed and
uniformly enforced.
"At a fundamental level, e-speak, UPnP, and Jini look like they're doing
the same thing (or at least are capable of doing the same thing)," Oaks
continues. "But they all do it differently, and that's going to impact
what they're really able to do."
Different implementations will also affect whether these technologies
assume complementary or competitive roles. Oaks and Wong believe market
forces will determine much of the outcome as these technologies become
more widely available. "It may be that Jini ends up being the service
application layer on top of UPnP for devices, and that e-speak is used
to make Internet e-commerce applications talk to each other, and everyone
will be happy."
Jini's future: "Innovation will happen"
Most current enterprise development work in the Jini community centers
on using Jini in conjunction with JavaSpaces, a Jini service for
workflow-related applications also covered in the book. Services can be
created that perform discreet units of work and pass data between each
other, for example. The authors anticipate that Jini developers will
continue to expand such applications by writing better, more robust
services within enterprise networks. But Oaks and Wong are hesitant to
make further predictions about how Jini will be implemented because no
one knows yet what the back-end system will look like.
Oaks draws a comparison to a prevailing belief during the early Java market
in 1995 that Java applets would have a major impact. However, Java has
ended up more predominantly used on servers. While the current buzz
around Jini centers on devices and device connectivity, what people are
actually doing with it is writing software-based services in their
enterprise, according to Oaks. "And just as Java applets are just now
beginning a resurgence, so too the case may be with Jini on devices in a few
years."
"The truth is, we probably don't know the answer to the question of how
Jini will ultimately be used," Wong adds. "In many ways it's like the Web:
when the Web started, it was to share documents. Now it's for e-commerce,
and video-on-demand, and a host of other things. There's a lot of talk
about how Jini will make your refrigerator talk to your toaster, but is
that really the way things will happen? Probably not." More likely, Jini
will lead to completely new ways of thinking about device interaction, and
on into uncharted territory in applications development.
"Someone out there will develop killer apps in Jini that we haven't even
thought about," Oaks concludes. "Bill Joy always says, 'Innovation will
happen, and it will happen elsewhere.' "
Return to: java.oreilly.com
|