So I have been experimenting with Rimfaxe which is a new oss web server servlet engine from my home town of Aarhus in Denmark.
I have to say that I am very much impressed. I immediately liked the idea of using it for various parts of the NeuClear architecture that require very high availability.
The first and most obvious difference in Rimfaxe is that it uses GCC’s GCJ Java compiler and environment. What this means is that Rimfaxe runs like a true native application offering very high speeds and lower theoretical overhead.
How does this affect writing servlets then? Do you need to know how to build using gcj??? For the simplest applications no. You place your servlet source code in the WEB-INF/rws/src/ folder and Rimfaxe automatically builds the source code with gcj and places a .so called libservlets.so under WEB-INF/rws/lib/. Basically Rimfaxe ignores the contents of WEB-INF/classes/ ( and I think WEB-INF/lib/) and sets up its own structure under WEB-INF/rws/ but the only one I know what to do with is src as jars appears to do nothing. (I shall ask the mailing list and report back)
The same goes for JSP’s. Rimfaxe uses Jasper (like tomcat and more or less everyone else) to generate the java sourcecode on the fly, then dynamically runs gcj to compile them into a .so shared object file into the WEB-INF/rws/jsplib directory. It even reloads them exactly like normal jsp’s do. The lag on the first load was very short as well, propably faster than javac’s compilation anyway.
Now the tricky bit is the external libraries. There are very few web applications now a days that just rely on the servlet api and nothing else. I may have misunderstood something, but from what I can see you need to compile them into linux shared objects and places them in the /shared directory of your Rimfaxe distribution directory.
Rimfaxe provides downloadable libraries for common libraries such as GNU JAXP and JDBC Drivers for MySQL and MSSQL.
To create your own, what I would do is to use the directory structure of one of these and edit the make files. This is a pain in the ass, but doable if desperate. It would be easier if rimfaxe would let gcj compile the contents of each jar in WEB-INF/lib to a shared object automatically. I am guessing that that is in the plans (or maybe its already there, but I dont know how to use it).
The second interesting feature of Rimfaxe, besides it’s use of gjc, is its use of SEDA technology to create a massively scalable web server. This uses non blocking IO and various clever queuing pipelines to be able to handle vast amounts of traffic safely. I did a lot of reading up about yesterday and Matt Welsh the guy behind SEDA has put some serious research into it, this counts as seriously cool technology. If you are interested in massively scalable web applications have a look at some of the papers on his site.
All in all I can say that Rimfaxe has taken a refreshing approach to servlet engines. It is definitely not for everyone, in particularly I dont think it would be of much use for inhouse applications, but for large public web services it shows some real potential.
This entry was posted in the following Categories: Java