Posted by herkules
on January 1, 2010 at 6:31 AM PST
Happy New Year folks!
In 2002, I wrote a highly specialized, very small Q&D tool for my brother to support him in his oncological doctoral's practice. They are three physicians sharing a common room with some unique ultrasonic device. They needed something showing them at their desk wether the room is available or is currently occupied by somebody else. The name 'dokma' is a German pun.
Admittedly not very pretty and I definately need to give it an UI overhaul.
Those days, I used RMI (still with 'rmic' to generate the stubs, supported by a NetBeans RMI plugin). The tool worked flawlessly since then. Yesterday, I did a small extension (allow for more physicians) and thereby upgraded to the new, stub-less RMI scheme.
While doing so, I remembered how cool RMI is. Today people tend to think of web technologies for everything that sounds like networked operation, starting with a tomcat as a bare minimum. But in this case, RMI is way easier and way cooler, for it allows to transparantly use callbacks for 'room-occupied' notifications and a tiny, integrated chat function.
String serverurl = "rmi://" + servername + "/DokmaServerInterfaceImpl";
mServer = (DokmaServerInterface)Naming.lookup( serverurl );
mServer.registerCallback( mCallback );
Very hard and cumbersome to achieve with web techniques. And RMI comes with the JRE, so the whole application still fits into a 50kb jar file and zero installation and configuration effort.
A point worth discussing: is RMI still the way to go today? What do the experts say?