Skip to main content

If you don't have an IBM ID and password, register here.

By clicking Submit, you agree to the developerWorks terms of use.

The first time you sign into developerWorks, a profile is created for you. This profile includes the first name, last name, and display name you identified when you registered with developerWorks. Select information in your developerWorks profile is displayed to the public, but you may edit the information at any time. Your first name, last name (unless you choose to hide them), and display name will accompany the content that you post.

All information submitted is secure.

The first time you sign in to developerWorks, a profile is created for you, so you need to choose a display name. Your display name accompanies the content you post on developerworks.

Please choose a display name between 3-31 characters. Your display name must be unique in the developerWorks community and should not be your email address for privacy reasons.

By clicking Submit, you agree to the developerWorks terms of use.

All information submitted is secure.

Jini and PvC

Problems and promise

Roman Vichr (rvichr@etensity.com), Senior Architect, Etensity
Roman Vichr is a senior architect at DDLabs (formerly Etensity), an e-commerce and EAI consulting company. His latest interests include expanding databases into wireless technology, after focusing on database management for client/server and Web applications development over the past nine years. His background is in fiberoptics, culminating in a Ph.D. in the field from Prague's Institute of Chemical Technology in 1992. You can reach him at rvichr@etensity.com.
Vivek Malhotra (vmalhot@yahoo.com), Wireless technology expert
Vivek Malhotra is a wireless technology expert based in the Washington D.C. area. Vivek has several years of experience developing and implementing wireless applications and has spoken on expert panels focusing on the wireless industry. You can contact Vivek at vmalhot@yahoo.com.

Summary:  As pervasive computing, or PvC, expands into a variety of devices, including mobile, we're all looking into various technologies to improve PvC services and reliability. One of the most promising of these technologies is Jini.

Date:  01 Jul 2002
Level:  Introductory

Comments:  

Jini provides an open solution for network interoperability issues in a distributed computing environment.This means that Jini does the following:

  • Finds and connects services on a network
  • Creates reliable sets of services out of unreliable parts, including the network itself
  • Deals with networks that are very large or last a very long time
  • Enables components of a service to change at any time without interrupting the service.

Jini network technology is built on the Java platform and provides an infrastructure to deliver services to devices within a network, regardless of connectivity, wire protocol, and transport protocol.

The nuts and bolts of Jini

As mentioned above, Jini is designed to provide spontaneous networking, allowing users to plug almost any Java-enabled device (that is, any device whose operating system supports Java applications) directly into a network with all components of the network instantly aware of the new device and its capabilities. If the new device is a printer, for instance, other computers in the Jini network will immediately be able to find and use that printer.

By using objects that move around the network, Jini architecture means the network as a whole, along with each of its individual services, will be adaptable to change. Jini architecture specifies a way for clients and services to find each other on the network and to work together to accomplish a task. Service providers supply clients with portable Java technology-based objects that give the client access to the service. This network interaction can use any type of networking technology, such as RMI, CORBA, or SOAP, because the client sees only the Java-based object, with all subsequent network communication confined to that Java object and the service from which it came.

When a service joins a network of Jini-enabled services and/or devices, it advertises itself by publishing a Java object that implements the service API. This object's implementation can work in any way the service chooses. The client finds services by looking for an object that supports the API. When it gets the service's published object, it will download any code it needs in order to talk to the service, thereby learning how to talk to the particular service implementation via the API. The programmer who implements the service chooses how to translate an API request into bits on the wire using RMI, CORBA, XML or a private protocol.


Challenges of Jini in PvC

Let's now look at the problems posed by using Jini in wireless devices, especially those caused by embedding Jini technology in mobile devices. First, Jini technology requires a full Java 2 Standard Edition (J2SE) virtual machine (VM) to be present on the device -- a difficulty which is compounded by the lack of a standard wireless networking technology for these devices.

To help overcome these problems, a surrogate Jini architecture has been created. Under the surrogate Jini model, a mobile device delivers code to the surrogate host, which then performs the regular Jini connection activities such as registering and using services on behalf of the device. A printer, for instance, could locate a surrogate host and deliver code in order to register a printing service on behalf of the printer. Likewise, a digital wireless camera could use the same surrogate host as a means of locating the printer and printing out a picture.


The Jini surrogate solution

The Jini surrogate project defines an architecture that allows devices that otherwise wouldn't be able to participate in a Jini network to do so. Most mobile and wireless devices fall into this category, specifically those used for PvC. It involves bridging the device and its environment with one object capable of interacting with the Jini network. To do this, an object (or surrogate) is created to act on behalf of the device. The device finds a surrogate host in its "native" network environment and registers with it, providing the surrogate host with either a JAR file or the location of a JAR file. The surrogate host instantiates a surrogate object, which is obtained from the JAR file. The surrogate object then becomes the device's representative on the Jini network.

Wireless connections are not noted for their stability. With surrogate architecture, if connections come and go, the surrogate object can remain active, maintaining information regarding the current session and playing an active role on behalf of the device in the Jini network. As different CDC devices become available, a surrogate specific to them can also be programmed.

The following are the advantages of using a surrogate Jini architecture:

  • Use of gateways to interconnect various devices (therefore suitable for PvC computing)
  • Jini surrogate host for legacy devices;
  • Local caching;
  • Single entry point to Internet (broadband WAN, lower bandwidth to local devices);
  • Firewall for local devices (high security); and
  • Wide industry adoption (OSGi -- see http://www.osgi.org -- Espial, Echelon).

All these advantages make Jini surrogate architecture well-suited for PvC computing, where the common attribute of the hardware or software components targeted by this architecture is the inability to download code, due to either resource limits on the device or network connectivity limitations (as in wireless networks). Following are the fundamentals of the Jini surrogate architecture in wireless PvC.

Device type independence: The surrogate architecture must be able to support a wide range of hardware and software components with different capabilities. A device like a cell phone cannot directly use Jini because it does not have the resources to support a full J2SE virtual machine.

Network type independence: The surrogate architecture must be able to accommodate a diverse range of connectivity technologies. Network type independence includes support for different protocols simultaneously on the same physical transport.

Preserve plug-and-work: The surrogate architecture must preserve the plug-and-work model of Jini technology. Jini architecture includes the concepts of discovery, code downloading, and leasing of distributed resources. This principle assumes existence of a machine that is connected to both the lightweight device and the Jini network to overcome limitations such as not being able to download code.


Additional PvC-suitable architectures derived from Jini

Here are some recent Jini projects undertaken to tailor Jini specifications to particular implementation needs.

Project Jump (addresses P2P networking)

Project Jump's goal was to create a new methodology of discovery and resolution for P2P, or point-to-point communication. This required a name server using a system of "natural language addressing" based on specifications, which has since been adopted by JXTA (see Resources) and an application gateway to provide a method of proxying private addresses. The project stalled without a solution, probably due to the JXTA project introduction. Details on using JXTA with J2ME can be found at their site.

Edge Networking (allows devices to communicate regardless of protocol)

Edge Networking allows all the devices located at the edge of networks, whether on LAN/WAN or through a dial/DSL connection, to be networked together. Edge Networking allows these devices to be easily discovered using natural language and allows inbound connections to these devices across traditional network boundaries. Edge Networking is transport protocol-independent, which allows application developers the flexibility to use JXTA, HTTP, SIP, or any other protocol to communicate.

Davis Project (addresses various aspects of security in JINI architecture)

The JINI Davis Project focused on support for several points to do with security architecture, including non-uniform network security (variations involving client, server, remote method, and parameters) and a variety of security implementations with differing protocols, algorithms, mechanisms, and policies.

Edge Zucotto Xpresso (commercially available JINI solution)

The commercial version of the JINI surrogate architecture is designed to enable even simple devices to make use of and provide Jini services, but the greatest benefit is obtained when using a device that is capable of running Java applications, such as a cell phone with an embedded Zucotto Xpresso Java-native processor.

Bluetooth (overcomes protocol differences and device awareness)

Bluetooth wireless technology provides a way for mobile devices to discover and communicate with other nearby devices. As new devices are brought into range and established devices are taken out of range, each device is kept aware of the other devices in its neighborhood. Such dynamic, impromptu networking is the perfect complement to Jini connection technology, which is designed to perform well in such situations meeting the requirements of the Jini surrogate architecture.

Objectives for J2ME RMI Profile

J2ME interoperability with J2SE 1.2.x or higher

Targeted at devices with:

  • 2.5 Mbytes minimum ROM
  • 1 Mbytes minimum RAM
  • TCP/IP connectivity
  • J2ME CDC/Foundation Profile

JINI with J2ME (overcomes limitations by treating devices as objects)

Currently, limitations exist for using Jini in CLDC wireless devices. With the implementation of the Jini surrogate project, Jini is being extended specifically for J2ME. Imagine using your J2ME device to participate in an online transaction, for example. As you move from location to location, you meet different people and find different items (clients). All this interaction occurs with your own transaction object, an object that is really your interface to this world -- an object you control from your J2ME device. When a transaction is undertaken, a billing service finds you, recognizes when you began playing, and starts to charge you accordingly.

The advantage of having devices as unique objects in the Jini network is to increase the set of interaction semantics. In a portal model, device login and registration might appear identical from the device's point of view, but other services see the portal, not the individual objects.


JINI-RMI approach (another way to overcome device differences)

Client A sends a multicast request to Lookup Service; and in the same way, Service B sends a multicast request to Lookup Service. The Lookup Service responds with a marshaled Lookup Service proxy object to Client A and to Service B; Service B sends a ServiceRegistrar.register() request to Lookup Service. Lookup Service responds with registration. Client A makes a ServiceRegistrar.lookup() on Service B, Service Lookup responds with a Service B proxy object. Client A directly sends the method on to Service B, and Service B thereby responds to Client A.

When Jini is used on small devices, the Service B residing on a small device faces a problem, since it cannot unmarshal the Lookup Service proxy object. That leads to a "pretend" Lookup service interaction with Client A. Client A calls ServiceRegistrar.register() which then returns a Service B proxy object. That means the device does its own Lookup Service and all the Jini discovery protocols; a Device Service Lookup Service proxy object runs entirely on a local client.


JINI and the future

As you can see, all of the particular implementations of Jini networking attempt to provide services that address specific solution needs, especially those concerned with the limitations of devices participating in a Jini network interaction.

Certainly, device limitation is a particular concern for the mobile world. The current standard cannot implement full-scale Jini and, therefore, in various projects a workaround has been established. The many variations on Jini architecture, from the Jini-RMI implementation, to Bluetooth's meeting requirements for surrogate Jini architecture, to the Davis project's security enhancements, to Jini architecture, tell us that Jini is not only here to stay awhile, but may prove to be the wireless key PvC has been needing. With Jini at hand we'll be able to meet the goal of enabling various devices on networks to create a true community of users..


Resources

About the authors

Roman Vichr is a senior architect at DDLabs (formerly Etensity), an e-commerce and EAI consulting company. His latest interests include expanding databases into wireless technology, after focusing on database management for client/server and Web applications development over the past nine years. His background is in fiberoptics, culminating in a Ph.D. in the field from Prague's Institute of Chemical Technology in 1992. You can reach him at rvichr@etensity.com.

Vivek Malhotra is a wireless technology expert based in the Washington D.C. area. Vivek has several years of experience developing and implementing wireless applications and has spoken on expert panels focusing on the wireless industry. You can contact Vivek at vmalhot@yahoo.com.

Report abuse help

Report abuse

Thank you. This entry has been flagged for moderator attention.


Report abuse help

Report abuse

Report abuse submission failed. Please try again later.


developerWorks: Sign in

If you don't have an IBM ID and password, register here.


Forgot your IBM ID?


Forgot your password?
Change your password


By clicking Submit, you agree to the developerWorks terms of use.

 


The first time you sign into developerWorks, a profile is created for you. This profile includes the first name, last name, and display name you identified when you registered with developerWorks. Select information in your developerWorks profile is displayed to the public, but you may edit the information at any time. Your first name, last name (unless you choose to hide them), and display name will accompany the content that you post.

Choose your display name

The first time you sign in to developerWorks, a profile is created for you, so you need to choose a display name. Your display name accompanies the content you post on developerWorks.

Please choose a display name between 3-31 characters. Your display name must be unique in the developerWorks community and should not be your email address for privacy reasons.

(Must be between 3 – 31 characters.)


By clicking Submit, you agree to the developerWorks terms of use.

 


Rate this article

Comments

Help: Update or add to My dW interests

What's this?

This little timesaver lets you update your My developerWorks profile with just one click! The general subject of this content (AIX and UNIX, Information Management, Lotus, Rational, Tivoli, WebSphere, Java, Linux, Open source, SOA and Web services, Web development, or XML) will be added to the interests section of your profile, if it's not there already. You only need to be logged in to My developerWorks.

And what's the point of adding your interests to your profile? That's how you find other users with the same interests as yours, and see what they're reading and contributing to the community. Your interests also help us recommend relevant developerWorks content to you.

View your My developerWorks profile

Return from help

Help: Remove from My dW interests

What's this?

Removing this interest does not alter your profile, but rather removes this piece of content from a list of all content for which you've indicated interest. In a future enhancement to My developerWorks, you'll be able to see a record of that content.

View your My developerWorks profile

Return from help

static.content.url=http://www.ibm.com/developerworks/js/artrating/
SITE_ID=1
Zone=Java technology
ArticleID=10681
ArticleTitle=Jini and PvC
publish-date=07012002
author1-email=rvichr@etensity.com
author1-email-cc=
author2-email=vmalhot@yahoo.com
author2-email-cc=

Tags

Help
Use the search field to find all types of content in My developerWorks with that tag.

Use the slider bar to see more or fewer tags.

For articles in technology zones (such as Java technology, Linux, Open source, XML), Popular tags shows the top tags for all technology zones. For articles in product zones (such as Info Mgmt, Rational, WebSphere), Popular tags shows the top tags for just that product zone.

For articles in technology zones (such as Java technology, Linux, Open source, XML), My tags shows your tags for all technology zones. For articles in product zones (such as Info Mgmt, Rational, WebSphere), My tags shows your tags for just that product zone.

Use the search field to find all types of content in My developerWorks with that tag. Popular tags shows the top tags for this particular content zone (for example, Java technology, Linux, WebSphere). My tags shows your tags for this particular content zone (for example, Java technology, Linux, WebSphere).