aspose file tools*
The moose likes Other JSE/JEE APIs and the fly likes Making Jini servers easier and lighter Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Other JSE/JEE APIs
Bookmark "Making Jini servers easier and lighter" Watch "Making Jini servers easier and lighter" New topic
Author

Making Jini servers easier and lighter

Frank Carver
Sheriff

Joined: Jan 07, 1999
Posts: 6920
I've been finding setting up all the various servers needed by Jini to be a real pain. What with rmiregistry, reggie, mahalo, outrigger and so on, I end up with loads of VMs running on the little Windows PC I use for this stuff, each with its own DOS window and irritating batch file to start it.
I've seen the Java GUI provided with the Jini starter kit, but that is neither scriptable nor runs these servers in a single VM.
This is all OK, as it allows me to use Jini, but can anyone suggest any way of running all these up in one go, in a single VM - it's got to be less load on the machine. I really want a one-click Jini, in the same way I that have a one-click Servlet/JSP container.

Read about me at frankcarver.me ~ Raspberry Alpha Omega ~ Frank's Punchbarrel Blog
Keith Edwards
Author
Greenhorn

Joined: Jan 02, 2001
Posts: 21
Hi Frank,
Originally posted by Frank Carver:
I've been finding setting up all the various servers needed by Jini to be a real pain. What with rmiregistry, reggie, mahalo, outrigger and so on, I end up with loads of VMs running on the little Windows PC I use for this stuff, each with its own DOS window and irritating batch file to start it.
I've seen the Java GUI provided with the Jini starter kit, but that is neither scriptable nor runs these servers in a single VM.

There are two answers to this question, I guess. The first is that if you want to do most vanilla Jini development, and you want to do it all on one PC (as opposed to relying on lookup services, etc., elsewhere on the network), you can get by with three--or even two--JVMs. Still a bit of a load, but you really don't need mahalo, outrigger, etc., unless you're specifically developing for these apps.
The only things you *have* to have on the network are a lookup service, rmid (used to active the lookup service), and a lightweight web server. If you don't mind losing service registrations between crashes, you can even use a transient version of the lookup service (see http://www.kedwards.com/jini/reggie.html) that doesn't require rmid.
The second answer is that people are working on this. There was a recent message in the JINI-USERS mailing list by someone who'd managed to get these services running in a single JVM; you might try hitting http://archives.java.sun.com (I did a quick search but couldn't track it down myself).
Hope this helps!
-keith

------------------
Keith Edwards
xerox palo alto research center
author of: Core Jini
Which is also available as A Video Course
Read an Example Chapter - Chapter 3 or Chapter 10.


<a href="http://www.kedwards.com/jini" target="_blank" rel="nofollow">Keith Edwards</a><br />xerox palo alto research center<br />author of: <a href="http://www.amazon.com/exec/obidos/ASIN/0130894087/keithedwards" target="_blank" rel="nofollow">Core Jini</a><br />Which is also available as <a href="http://www.amazon.com/exec/obidos/ASIN/0130863866/keithedwards" target="_blank" rel="nofollow">A Video Course</a><br />Read an Example Chapter - <a href="http://www.javaranch.com/bunkhouse/samps/Core_Jini_chap3.pdf" target="_blank" rel="nofollow">Chapter 3</a> or <a href="http://www.javaranch.com/bunkhouse/samps/Core_Jini_chap10.pdf" target="_blank" rel="nofollow">Chapter 10</a>.
Frank Carver
Sheriff

Joined: Jan 07, 1999
Posts: 6920
Thanks for the reply, I'll certainly check that out.
I was really quite disappointed when I first tried to get Jini up and running, that it seems so "heavy". Jini is touted as a solution for small, mobile, embedded systems, and yet it's clumsy to set up and needs a lot of system resource. I'm also worried that a developer seems to have to know so much fiddly stuff to get going. "Jini in a Nutshell", for example, has seven or eight pages of description just on how to start the various servers.
Maybe I'm missing the point. Does Core Jini come with any extra scripts or software to simplify installing and running Jini?
Muhammad Ali
Greenhorn

Joined: Dec 04, 2000
Posts: 28
Hi,
I also feel very annoyed by so many JVMs. And then I decided to use "virtual desktop" software. You can get one from download.com. The concept is very simple: you get more than one desktop each one running its own windows / applications. I use on of these virtual desktops to run reggie and another to do the development stuff.
I am sure that such software exist for other OS too. Just my $0.02.
Muhammad Ali Shah
Karachi, Pakistan.
Keith Edwards
Author
Greenhorn

Joined: Jan 02, 2001
Posts: 21
Originally posted by Frank Carver:
I was really quite disappointed when I first tried to get Jini up and running, that it seems so "heavy". Jini is touted as a solution for small, mobile, embedded systems, and yet it's clumsy to set up and needs a lot of system resource. I'm also worried that a developer seems to have to know so much fiddly stuff to get going. "Jini in a Nutshell", for example, has seven or eight pages of description just on how to start the various servers.
Maybe I'm missing the point. Does Core Jini come with any extra scripts or software to simplify installing and running Jini?

I agree with you 100%--the hassle of starting the various services is probably the chief turn off for people doing Jini development right now.
I don't know how far you've gone with Jini, so you probably already know this, but I'll point it out for those who don't: all of the standard Jini services (the lookup service, mahalo, outrigger, and the new ones in 1.1) are activatable. This has the nice property that you generally only have to go through the hassle of running them once, ever. After you've got the startup parameters right, then rmid will automatically restart the whole schebang if they ever crash, or the next time rmid restarts (after a machine reboot, for instance). So you get to amortize the pain over your whole Jini development lifetime. :-)
Core Jini does indeed come with scripts, but--to be honest--they probably don't help that much since there's still some local tweaking that has to be done to start things. In the book, I try to encourage people to just endure the pain and get things started right once, because it's generally the last time they'll have to do it.
On the small devices issue, the general deployment strategy would be for "heavyweight" Jini services to live out on the network someplace, with only much more lightweight services and clients on the small devices themselves... I would never imagine a cell phone or PDA running a lookup service, for instance.
Cheers,
-keith


------------------
Keith Edwards
xerox palo alto research center
author of: Core Jini
Which is also available as A Video Course
Read an Example Chapter - Chapter 3 or Chapter 10.
Mark Herschberg
Sheriff

Joined: Dec 04, 2000
Posts: 6037
I'm not that familiar with the details of Jini, but would the JDK 1.3 Activation Framework help make this a bit easier? You could run one program which calls the activation framework to startup others. Granted, you'd still run a couple of JVMs, but then, Jini's supposed to be running on a few different JVMs, since its designed for distributed system. It should at least simplify the startup process, although I suppose you're really trading bat files for java code.
Please let me know if this isn't applicable, and why it isn't. Thanks.
--Mark
hershey@vaultus.com
Keith Edwards
Author
Greenhorn

Joined: Jan 02, 2001
Posts: 21
Hi Mark,
Originally posted by Mark Herschberg:
I'm not that familiar with the details of Jini, but would the JDK 1.3 Activation Framework help make this a bit easier? You could run one program which calls the activation framework to startup others. Granted, you'd still run a couple of JVMs, but then, Jini's supposed to be running on a few different JVMs, since its designed for distributed system. It should at least simplify the startup process, although I suppose you're really trading bat files for java code.
Please let me know if this isn't applicable, and why it isn't. Thanks.
--Mark
hershey@vaultus.com

In fact, this is exactly what Sun's implementation of all the core Jini services does... all of the Jini infrastructure is activatable, so you only have to start it up once, ever.
-keith

------------------
Keith Edwards
xerox palo alto research center
author of: Core Jini
Which is also available as A Video Course
Read an Example Chapter - Chapter 3 or Chapter 10.
Anil Vupputuri
Ranch Hand

Joined: Oct 31, 2000
Posts: 527
So Jini entirely relies on Lookup services..so can hand held devices run this Lookup services using VM? How objects retain their life...is it thru serialization or some other mech.

Anil


SCJP 1.5, SCEA, ICED (287,484,486)
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Making Jini servers easier and lighter