Newsletter sign-up
View all newsletters

Sign up for our technology specific newsletters.

Enterprise Java
Email Address:

The skinny on Jini

Jini and JavaSpaces bring true distributed computing to Java

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

Page 2 of 5

Let's look at an example of how Jini works in an actual system. We'll use an inventory management system based on an idea brought up during the Conference on Electronic Commerce and Marketplace last April at the University of Austin. You're given an inventory management system in which each type of item in the inventory is managed by an agent. The agent is responsible for allocating ("selling") its items to the agents requesting ("buying") them. Essentially, with competing agents providing products of a similar type, you create a stock market-like exchange system with agents bidding for items to satisfy a request. A real-world example of this system might be the relationship between a car parts dealer and the various manufacturers selling the parts.

In a JavaSpaces system, a customer would go to the car parts dealer and put in a request for a carburetor for a 1989 4-cylinder Chevy Beretta. The order goes into the distributed JavaSpaces system (a "space"). It first enters the subsection of the space represented by the warehouse, or the warehouse space. This warehouse space then negotiates with the subsections of the car manufacturers (the car manufacturer's spaces) or parts distributors (the parts distributors' space). It issues a template describing the part. The various spaces respond with a list of available entries. The warehouse space server object compares them for price, features, reliability, and so on, and then issues either a read operation in the case of a car manufacturer (since it can make any number of identical copies of the part), or a take operation in the case of a parts distributor (since it has a given supply of the part); in truth, the car manufacturer space doesn't have an unlimited supply, but this is just an example. Let's say the customer wants to give back its defective carburetor, which is usually sent back to the manufacturer because it may be recoverable. In this case, the client reads the part from the car parts store warehouse space and writes it to the car manufacturers space.

JavaSpaces-Jini versus everything else

During our analysis and in talking to other developers, it becomes clear that Jini and JavaSpaces share similarities with a number of existing technologies. To give you a firm understanding, we'll make a few comparisons.

First, let's compare JavaSpaces-Jini with some of the other technologies from Sun's Java Software Division. JavaSpaces is a system for developing distributed applications. A distributed application usually consists of components running on several machines that communicate with each other to process the application. Think of this as a server-side application, where the server application is broken into several parts, each running on a different machine but still working as a whole.

Sun JavaServer
The Sun JavaServer (a.k.a. Jeeves) is simply an extended Web server with a backend programming interface that allows you to create servlets. It is directly comparable to the traditional CGI model, whereby accessing a link on a Web page can execute a program. However, servlets do not break into separate applications that automatically run across several computers to execute your program. You can make them do that, but you'll have to build the mechanism yourself.

  • 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
  • Sun's Jini home page http://java.sun.com/products/jini/index.html
  • The real meat of the matter, the Jini specification http://java.sun.com/products/jini/specs/index.html
  • Sun's JavaSpaces home page http://java.sun.com/products/javaspaces/
  • The JavaSpaces specification http://java.sun.com/products/javaspaces/specs/index.html
  • Read all about the Object Management Group and CORBA http://www.omg.org
  • Lucent Technology's Inferno system http://www.lucent-inferno.com/Pages/Developers/index.html
  • The PVM home page http://www.epm.ornl.gov/pvm/pvm_home.html
  • This online book will familiarize you with PVM in detail http://www.netlib.org/pvm3/book/pvm-book.html
  • "Do-It-Yourself Supercomputers", Wired News, July 3, 1998 http://www.wired.com/news/news/technology/story/13440.html
  • DATEK, an enterprise resource planning application vendor, announces the first distributed application integrated with Javaspaces and Jini http://www.internetwire.com/technews/tn/tn980741.htx
  • Check out News.com's report on Jini, "Sun makes another run at Windows," which debuted just before its release http://www.news.com/News/Item/0,4,24214,00.html