Sponsored Link •
Bill Venners: Another programmer challenge is the heterogeneity of hardware being programmed. This is particularly a challenge when creating mobile objects. The Java platform of course provides a great deal of homogeneity, but Java platforms are heterogeneous to the extent that different versions exist, different flavors exist (J2ME, J2SE, etc.), different API profiles exist, and so on. I'd like to be able to send out a Jini service proxy and when it lands, have it look around and dynamically load an implementation that makes sense. Could you speak to this and other strategies programmers could use to deal with heterogeneity?
James Gosling: The environmental differences from place to place get difficult to deal with. There have been a number of things that people have tried to do. This isn't exactly what you are talking about, but it's close, which is WebStart. In that, this mobile object, to use your term, comes along with a specification of the versions of the things it depends upon. It depends on a particular VM version at least. It needs the following add-on libraries. It needs the point of sale terminal and 3D rendering libraries. And that actually has been working pretty smoothly.
Bill Venners: I see. We used the same describe-the-requirements approach in the Jini Service UI spec. We don't actually send UI objects along with the Jini service proxy, we send a list of descriptions of available UI objects, including describing required packages.
James Gosling: Yeah.
Bill Venners: The client looks through the list and says, "This is a
JFrame. I can't use
that because I don't have Swing, but this here
Frame. I do have AWT, so I could use
Frame, except that over here it says it requires the
speech APIs, and I don't have that." So the client looks through the list and picks a best-fit UI
object. But a Jini service proxy, that one, it just goes and needs to work wherever it lands. Well, it
doesn't have to run everywhere, it just has to run everywhere you care about.
James Gosling: Right.