Activatable Jini services, Part 1: Implement RMI activation
The RMI activation framework can produce self-sufficient, flexible Jini services
By Frank Sommers, JavaWorld.com, 09/15/00
- Digg
- Reddit
- SlashDot
- Stumble
- del.icio.us
- Technorati
- dzone
A fundamental shift is taking place in the systems architectures of major software vendors. Presently, the industry aims to
deliver services via software in such a way that users can interact with these services virtually anywhere, at any time, from
any device. This new paradigm has been compared to a dial tone; practically anywhere in the world, one can pick up a phone
and immediately hear a dial tone. Software services like banking, insurance, news, inventories, sales leads, and travel schedules
may soon be as accessible as that familiar hum. IBM's WebSphere, HP's e-speak, and Microsoft's Microsoft .Net are all different
manifestations of this ambitious desire, as is Sun's Jini.
TEXTBOX:
TEXTBOX_HEAD: Activatable Jini services: Read the whole series!
:END_TEXTBOX
The notion of a service lies at the heart of Jini. The Jini Specification defines a service as "... something that can be
used by a person, a program, or another service ... Services will appear programmatically as objects in the Java programming
language, perhaps made up of other objects ... A service will have an interface, which defines the operations that can be
requested of that service. The type of the service determines the interfaces that make up that service." (See Resources for the Jini Specification.)
In Jini, a software component makes its services available through a proxy. Other services must locate that proxy to interact
with a service within djinn, a federation of Jini services. Jini offers a robust mechanism, based on the Java language interfaces implemented by the proxy,
that helps you look up proxies and other optional parameters. However, the ubiquitous computing environments promised by Jini
and other service-oriented architectures require a service that is easily locatable and readily available.
For services with simple functionality, the proxy, once retrieved from the lookup service, might be able to operate independently
-- making it a "strictly local" proxy. For instance, a service that converts decimal numbers into their hexadecimal equivalents
would likely perform this computation entirely in the client's address space. For more involved services, the proxy might
have to communicate with external resources running on other hosts. An example would be a currency converter, which must obtain
up-to-date currency valuations to perform its service. For such a service, the proxy is not enough -- any other resources
the proxy needs must also be on hand.
RMI in the Jini environment
The Jini Specification leaves the proxy, protocol, and server to communicate with the service implementation. The service
implementation is hidden from the client, which only has to agree on the Java programming language interface, not a specific
wire protocol, to interact with the service. Java Remote Method Invocation (RMI) can conveniently arrange such communication.
All Jini services in Sun's implementation of the Jini Specification use RMI. Since Jini proxies can implement any part of
the J2SE platform, of which RMI is a required component, any client VM using a Jini service proxy probably supports RMI.
- Digg
- Reddit
- SlashDot
- Stumble
- del.icio.us
- Technorati
- dzone
Resources
- The promise of a future where software services are transparently available on the network is eloquently described by David
Gelernter in his manifesto, The Second Coming
http://www.edge.org/3rd_culture/gelernter/gelernter_index.html
- The Sun technical report TR-95-46, "Simple Activation for Distributed Objects" by Jim Waldo, Ann Wollrath, and Geoff Wyant,
is available at Sun's Website
http://www.sun.com/research/techrep/1995/abstract-46.html
- The RMI Specification
http://java.sun.com/j2se/1.3/docs/guide/rmi/spec/rmiTOC.html
- Chapter 7 of the RMI Specification specifically describes remote object activation
http://java.sun.com/j2se/1.3/docs/guide/rmi/spec/rmi-activation.html
- Sun's RMI home page has many useful pointers for all things RMI
http://java.sun.com/products/jdk/rmi
- Sun's RMI team presents a useful activation tutorial
http://java.sun.com/j2se/1.3/docs/guide/rmi/activation.html
- "The End of Protocols," Jim Waldo (java.sun.com, June 2000) -- Jini's chief architect describes the end of protocols and explains why Jini is not tied to RMI (free registration
to the Java Developer Connection required)
http://developer.java.sun.com/developer/technicalArticles/jini/protocols.html
- The Sun technical report TR-94-29, "A Note on Distributed Computing," by Samuel C. Kendall, Jim Waldo, Ann Wollrath, and Geoff
Wyant, describes the role of
RemoteException, explains why it is a checked exception and not a runtime exception, and discusses the difference between remote and local
method invocations
http://www.sun.com/research/techrep/1994/abstract-29.html
- In a message posted to the RMI-users list, Ann Wollrath explains different ways of implementing persistent remote references.
She also discusses how
ActivationGroupDesc can be used to set up a common environment for a group
http://archives.java.sun.com/cgi-bin/wa?A2=ind0007&L=rmi-users&P=R13480
- The Jini home page contains pointers to all of the Jini technical documentation
http://www.jini.org
- Jini Specifications
http://www.sun.com/jini/specs
- Bill Venners maintains the Jini FAQ
http://www.artima.com/jini/faq.html
- Venners also manages Jini Corner on his Website
http://www.artima.com/jini/index.html
- The Directory of Jini Resources on the Net
http://www.litefaden.com/sv/jd
- Sun's John McClain posted "The Process Architecture of the JSK and JSTK" to the Jini-users list. It presents a clear explanation
of the role of RMI activation in Sun's implementation of the services that come with the JSK
- Manifestations of a service-oriented computing landscape