Monday, June 2, 2008

JBoss Seam and the 32 bit Vs 64 bit saga

Choosing a Java Virtual Machine to deploy our application proved a tough task . Our development environment is primarily a mix of Linux desktops (Fedora 5, CentOS, Ubuntu ).

We started with JBoss Seam 1.2.GA and initially chose Sun's JDK 1.5 on a 32 bit Operating Systems . This turned out to be a disaster during development as our our already long "Compile Deploy Test" cycle took even longer. We hit the dreaded PermGen Space problem (JBOSS Seam Mailing List)very often. We switched to JRockit 1.5 32 bit version and found that it did not solve the problem completely . The time between PermGen Exceptions increased from every 2nd deploy to every 5th deploy.

On a hunch we moved the Operating System from 32 bit to 64 bit and also moved the JVM from 32 bit to 64 bit . That combination of OS and JVM solved the PermGen Space problem completely. We tried running the 64 bit Sun JVM and found that it still had the Class Loader problem.

Moving to a 64 bit Operating Systems had its own share of problems . The primary one being non availability of Flash plugin for the 64 bit browser on the CentOS. The developers were reluctant to move since that stopped them from wathcing YouTube movies :-) . Also circa 2007 not many libraries were available for 64 bit Linux compared to the 32 bit . I think that situation has improved a lot in the current years particularly with the Ubuntu Operating System. There is a flash plugin which can be installed with apt-get . Also the CentOS versions had a work around which allows the 32 bit flash plugin to be installed on the 64 bit machines

Another issue that we faced (from a System Administration point of view) was that we could not run a 64 bit OS on the laptops. The Dell laptop 6400 that I had ( circa 2006) did not support running 64 bit Operating System and I had to settle running for a 32 bit version on the laptop and a 64 bit version on the desktop. This meant I had to maintain 2 local copies of the repository since otherwise a disconnect from the Internet meant no possible updates

One of the advantages of moving to the 64 bit Operating System meant that we could take advantage of more memory. Take a look at the 3GB memory barrier for a description of why 32 bit OS cannot use the 4GB memory completely.


Sunday, June 1, 2008

Payback time

The blogs and the open source community has been incredible treasure trove of knowledge . We have searched and found a lot of answers to our problems . There are some problems for which we found no answers . We groped around some of these problems and did find some solutions and workarounds. We did discuss about contributing back to the community . This blog post is a small way of contributing back to the open source community
Our project uses the JBoss Seam Application framework . I plan to write a series of articles focusing on the pains , joys, advantages and disadvantages of using these technologies .
The major technologies that we use are JSF, Facelets, Rich Faces . Our application is deployed on top of the JBoss AS . I am not an expert in these technologies. These views are my own and the methods described in these posts did work for me . Your mileage may vary. But I will try to help in case you face any problems