PR: ? I: ? L: ? LD: ? I: ? Rank: ? Age: ? I: ? whoissource Density

Java Porting Case Study

Windows NT 4.0 -> Solaris 2.5.1
Sun's Java JDK 1.1.x
10 June 1998
BlueDot Software, San Francisco, CA
BlueDot Software


I am glad to say that the dream of write once run anywhere is true in my neck of the woods. I have taken a complex, n-tier distributed database application with a web front end, dynamic image generation capability, and servlets and ported it from WindowsNT to Solaris with exactly one small change. ( one batch file had to have "\" changed to "/" ) Total port time: about as long as it took to install all the software - 1 hour not counting most of my configuration mistakes. During the port I also switched from JavaWebServer to Apache using JRun as the servlet engine. Not counting stupid mistakes I made installing JRun, no effort was required for switching web servers or servlet engines. Anyone new to pogramming ( since the advent of Java ) may think nothing of this, but to think that two years ago this would have been a total pipe dream, just blows me away. This is not a pure java system, but many of components are and that what makes this possible. This is a real enterprise system from database to web interface and everything in between. And this port was truly trivial. Viva la Java! Another interesting point is that this was built mostly with free software. I bought the database, and one copy of JavaWebServer ( which I could replace with Apache and JRun ) and everything else was free. Viva la free! There are a couple things I could have done better and I have some thoughts and comments about each of the pieces used. If anyone cares to read them. If you're wondering why this mail was sent to this list, its because this is a list-serv for at least one of my "pieces" of technology. Its nice to hear a good succesful integration and port story, at least I think so. Technology used/notes I started on WindowsNT because my Linux and Solaris machines were busy doing the actual running of my business. Now that my development is about finished, I am porting from NT to my deployment platform, Solaris ( database ) and Linux ( web server ) I don't really trust NT anyway. Web Server: JavaWebServer on NT ( www.sun.com ) A great web server on any platform. Super easy to administer. Apache on Solaris/Linux ( www.apache.org ) The industry standard web server. Tough to administer, but full source available. Runs on almost any platform. Database: ObjectStore with OSJI 1.3 interface ( www.odi.com ) An excellent high-end enterprise object database. Its a C++ database with an available Java Interface ( OSJI ) The database has been ported to all major server platforms but Linux. Within those platforms there should be no porting issues. Also from ODI is PSE Pro, a lighter weight Pure Java Database that should really port anywhere. If trends continue you could run it on your wrist watch in a couple years. Porting from PSE to OSJI is also a snap, though maybe not from OSJI to PSE. Distributed Technology: Voyager 2.0.0 beta 2 ( www.objectspace.com ) An excellent soon-to-be-IIOP-compliant technology. Its pure Java so porting issues with Voyager didn't even enter my head. Though voyager is proprietary, unlike RMI, it is just so much better than RMI that you don't care, and the price ( free ) is the same. ServletEngine: JavaWebServer on NT ( www.sun.com ) - see above JRun on Solaris/Linux ( www.livesoftware.com ) - a great solution for giving legacy web servers the ability to use servlets. A little hard to configure, but implements the servlet spec. well. Available on just about any platform. Works with major web servers like Apache and Netscape. A professional edition is available too. Parsing: HTML page generation done from Templates. Templates use parsing technology I wrote myself using: OROMatcher 1.1b3 ( www.oroinc.com ) I love this product. Its all Java. Run it anywhere. Gif Generation: GifEncoder from Acme.com ( www.acme.com ) This guy at Acme is a goldmine. Its all Java. No porting issues. Development Environment: Emacs and bash. Available everywhere and better than that damn "Visual Whatever" thing you are running. Notes for those who may port. The only "dumb" thing I did was a few filenames were hardcoded including the "c:" and the "\" which needed a small touch up for UNIX. The java.io.File.fileSeparator handles the slash. The VM on UNIX implements fileSeparator as a "/" and the VM on Windows implements it as a "I'm-Bill- Gates-And-I-Do-Things-Differently-Because-I-Can \". I'm not sure yet what to do about the "c:". Possibly I can ignore it, possibly there is some other thing in java.io.File to handle it. Amazingly, that's all the notes I have. What a simple port. :)

Return to Gene's Home Page
Return to Gene's Random Java Crap