17 December 2010

Testing with Selenium Grid

This week I tasked myself with finding and fixing memory issues that we've found in the current app I'm working on. Now Java is supposed to be good at reclaiming memory and leaks can be difficult to find.

A little background on the project: it was originally outsourced to a company in India, but has sense been brought in-house for future development and enhancement.

After looking what we were given and fixing initial problems, there were obvious spots that needed refactoring. Moving from the blatant, we started working on the more intricate parts.

Among other things, the application uses Hibernate for persistence. This isn't my first interaction with Hibernate and I rather like it. To call the implementation we were given bastardized might be a compliment. Ripping out the most obscene parts, we were left with a workable solution.

Further refactoring and we had a solution that no longer referenced any of the old code. Usually this is a good thing (tm), but after doing some load testing, it became apparent that we had some memory issues that needed addressing.

After looking at what we were given and what it was changed to, I got a hunch that something wasn't right. Digging through documentation, I had the a-ha moment. We were loading a new SessionFactory for each new database connection. As the documentation says, the SessionFactory should be a singleton. So after making that change, the memory issue was resolved.

Helping find the issue was the load testing environment that was setup. Utilizing Selenium Grid to run tests helped identify the issues we were facing. If you haven't heard of Selenium, I suggest checking it out for doing your acceptance testing. Our environment consists of 5 VMs running Fedora. One has an application and database server and the other 4 run the Selenium Grid. If you have some free time and some extra capacity, check it out.

30 June 2010

Fedora 13 & Two finger scrolling

So this took me a while last night... Trying to figure out two finger scrolling in Fedora 13. I've successfully configured touchpads in the past with the HAL policy + .fdi configuration, but in fc13, that's been deprecated in favor of udev and xorg.conf. Here's a really good tutorial on setting up your xorg.conf file with some common params: http://wiki.archlinux.org/index.php/Touchpad_Synaptics

That works for most (and should make your two finger scrolling work just fine), however it didn't for me. Then I came across this post: http://www.cnpbagwell.com/linux/fedora-13-and-asus-eee-pc-1005peb (see the Touchpad section). I didn't dig as far Chris Bagwell did, but taking his suggestion on trying the two finger emulation, everything worked perfectly on my Gateway LT21. The two lines below are what I used:


Option "EmulateTwoFingerMinZ" "35"
Option "EmulateTwoFingerMinW" "8"



Here's a web version of synaptics man page that shows most of the options available for your synaptics driver version: http://linux.die.net/man/5/synaptics. Of course, to see a list of the options that your current driver supports, run this at a term:


man synaptics



As of writing, the latest version is 1.2.2. To update in Fedora run:


sudo yum update xorg-x11-drv-synaptics



Good luck.

06 May 2010

Nashville flood

There hasn't been a whole lot of coverage for the Nashville flood, but here's a good representation of what we went through: http://www.boston.com/bigpicture/2010/05/flooding_in_tennessee.html
http://www.nashvilleflood.net

If you'd like to make a donation to the Second Harvest Food Bank, Salvation and Red Cross, visit http://www.wsmv.com
http://www.cfmt.org/floodrelief/

If you'd like to donate time, go to http://www.hon.org

Awesome page to show you how to donate money/time/whatever you have: http://nashvillest.com/2010/05/03/so-nashville-is-flooded-how-can-i-help/