Object Mobility in the Jini Environment
Simplify the Installation and Configuration of Jini Applications
by Frank Sommers
First Published in JavaWorld, January 2001
<< Page 9 of 9
Summary
Object mobility on the network is the cornerstone of Jini technology, and one of the most powerful ways in which Jini is able to contribute to a more robust, less error-prone computing environment. Jini exploits the JVM's ability to dynamically download and link code from anywhere on the network, and takes advantage of object serialization to transport objects between Java VMs in a distributed Jini federation. To allow both objects and classfiles to independently traverse the network, Jini builds on the codebase annotation technology employed by Java RMI: the codebase URLs for an object's class are annotated to the object's serialized stream. These techniques together allow a client to have only a well-known Java language interface type locally available. The Jini discovery protocols can find lookup services and retrieve any object that guarantees the contract specified by the service interface. Classes required to interact with the service are then dynamically downloaded to the client from the service's codebase URLs.
As for the island of Utopia? Sir Thomas More was imprisoned and executed by Henry VIII in 1532, so he unfortunately won't be able to report on a utopian computing landscape. However, he would certainly see the promise that Jini and mobile code can bring to a more ideal computing world.
About the Author
Frank Sommers is founder and CEO of
AutoSpaces.com, a startup focusing on
bringing Jini technology to the automotive software market. He also serves
as VP of technology at Nowcom, a Los Angeles-based outsourcing
firm. He has been programming in Java since 1995, after attending the first
public demonstration of the language on the Sun Microsystems campus in
November of that year. His interests include parallel and distributed
computing and the discovery and representation of knowledge in databases, as
well as the philosophical foundations of computing. When not thinking about
computers, he composes and plays piano, studies the symphonies of Gustav
Mahler, or explores the writings of Aristotle and Ayn Rand. Frank would like to thank John McClain, member of Sun's Jini development team, for his valuable comments on this article.
Resources
- Allen Holub talks with Alan Cooper in ITworld.com's Interviews forum:
http://www.itworld.com/jump/jw-0105-jiniology/forums.itworld.com/webx?7@@.ee6cff8/2!skip=-22
- The Java Virtual Machine Specification, Second Edition, Chapter 5:
http://java.sun.com/docs/books/vmspec/2nd-edition/html/ConstantPool.doc.html
- The Java Object Serialization Specification:
http://java.sun.com/j2se/1.3/docs/guide/serialization/spec/serialTOC.doc.html
- The Java Remote Method Invocation Specification:
http://java.sun.com/j2se/1.3/docs/guide/rmi/spec/rmiTOC.html
- Section 10.3.1 describes codebase annotation:
http://java.sun.com/j2se/1.3/docs/guide/rmi/spec/rmi-protocol4.html
- Section 3.4 describes dynamic class loading:
http://java.sun.com/j2se/1.3/docs/guide/rmi/spec/rmi-arch5.html
- Section 7.4.9 describes the
MarshalledObject class:
http://java.sun.com/j2se/1.3/docs/guide/rmi/spec/rmi-activation5.html
- Section 7 describes activatable RMI objects:
http://java.sun.com/j2se/1.3/docs/guide/rmi/spec/rmi-activation.html
- The Jini Architecture Specification, Version 1.1:
http://www.sun.com/jini/specs/jini1.1html/jini-title.html
- Jini Technology Glossary:
http://www.sun.com/jini/specs/jini1.1html/glossary-title.html
- The Jini Core Platform Specification:
http://www.sun.com/jini/specs/jini1.1html/core-title.html
- The Jini Core Platform Specification, Section DJ2, explains discovery:
http://www.sun.com/jini/specs/jini1.1html/discovery-spec.html#19702
- "Activatable Jini Services", Frank Sommers (JavaWorld, September 15, 2000):
http://www.javaworld.com/javaworld/jw-09-2000/jw-0915-jinirmi.html
- Gosling speaks about the important of knowing the semantic contract specified by a Java object in "An Interview with James Gosling," Bill Venners (JavaWorld, June 6, 2000):
http://www.javaworld.com/javaworld/jw-06-2000/jw-0608-gosling.html
- "Jini Community Pattern Language" Richard P. Gabriel and Ron Goldman:
http://jini.org/JiniCommunityPL.html
- "Sun Lets Jini Starter Kit 1.1 Out of the Bottle" (JavaWorld, December 8, 2000) -- Jini architect Jim Waldo talks to Frank Sommers about the importance of having the Java service interface available to both client and service:
http://www.javaworld.com/javaworld/jw-12-2000/jw-1208-waldo.html
- The Jini ServiceUI project home page:
http://developer.jini.org/exchange/projects/serviceui
- Object-Oriented Software Construction, Second Edition, Bertrand Meyer (Prentice Hall, March 2000):
http://www.amazon.com/exec/obidos/ASIN/0136291554/o/qid=978025334/sr=2-1/104-2016221-1893530
- An electronic edition of Thomas More's Utopia:
http://www.d-holliday.com/tmore/utopia.htm
- The Jini Printing working group homepage contains the printing APIs:
http://developer.jini.org/exchange/users/jpgwg/
- "Dynamic Code Downloading Using RMI" -- an excellent short tutorial at the RMI homepage:
http://java.sun.com/j2se/1.3/docs/guide/rmi/codebase.html
- Specifying the codebase requires the use of URLs. To learn about properly constructing URLs, see RFC 1738:
http://www.rfc-editor.org/rfc/rfc1738.txt
- In addition, RFC 1808 describes the use of relative URLs:
http://www.rfc-editor.org/rfc/rfc1808.txt
- Adrian Colley from Sun posted this message to the RMI mailing list on the use of URLs in codebase specifications:
http://archives.java.sun.com/cgi-bin/wa?A2=ind0009&L=rmi-users&O=A&P=23120
- Bill Venners's Under the Hood series provides a wealth of information on the internals of the Java Virtual Machine, including class loading:
http://www.artima.com/underthehood/index.html
- You can also purchase Venners's book on the same topic, Inside the Java Virtual Machine:
http://www.artima.com/insidejvm/blurb.html
- Complete listing of all previous Jiniology articles:
http://www.javaworld.com/javaworld/topicalindex/jw-ti-jiniology.html
- Sign up for the JavaWorld This Week free weekly email newsletter and keep up with what's new at JavaWorld:
http://www.idg.net/jw-subscribe
- Talk about Jini and other distributed Java services in JavaWorld's Java in the Enterprise discussion:
http://www.itworld.com/jump/jw-0105-jiniology/forums.itworld.com/webx?14@@.ee6b80a
"Object Mobility in the Jini Environment" by Frank Sommers was originally published by JavaWorld (www.javaworld.com), copyright IDG,
January 2001. Reprinted with permission.
http://www.javaworld.com/javaworld/jw-01-2001/jw-0105-jiniology.html
<< Page 9 of 9