May 31, 2004

Updates update

Well, my laptop spent the better part of the long weekend busy compiling away at all 500MB + of update sourcecode. Luckily, no major issues at all, just a few minor bugs that I had to work around once everything was done due to config file changes. And, things actually are working better for me now in some cases.

Before I had troubles with the battery applet taking up CPU time for no apparrent reason, but not anymore. They must have fixed that in Gnome 2.6. Yeah!

Another "issue" I ran into was upgrading PostgreSQL. Since I did a "major" upgrade, I had to dump all of my data and recreate my databases from scratch, then import my data. I was hesitant to do this on my server, but now that it's nothing at all from upgrading the copy on my laptop, I will probably be doing the updates on my server soon. Just a matter of running pg_dumpall and then psql -f and it's all back.

I do, however, have at least one program that does not want to work for me, Rhythmbox. Everytime I start it, it crashes. Just throws up a dialog saying that it needs to be restarted. If I leave it go, the music plays fine though, but then again, it's jsut a front to mpg123. Guess I'll go back to just using my old MP3 player.

Can't complain too much about the upgrade, things went a lot smoother than I was expecting.

Posted by doug at 10:30 PM | Comments (15)

May 28, 2004

Gnome 2.6 marked stable

I found out this morning while doing my usual emerge sync that Gnome 2.6 is now marked as stable for the Gentoo distribution of Linux. I took a look at the output of a pretend update and there are now over 550 MB of source that will need to be fetched and compiled because I have been slacking on my updates until 2.6 was marked stable. Guess my little laptop will be busy this weekend downloading and compiling lots of source code. I just hope after all this time and waiting that everything will still work as it does now for me. I took a few minutes to check the forums for notable bugs with Gnome 2.6, but the only things I saw seemed to be caused by people running the unstable version and not upgrading other libraries/programs as needed. We'll see.

Posted by doug at 11:35 AM | Comments (0)

J2EE Performance in a large scale environment

Lately at work, I have been part of the performance evaluation and recommendation team. It all started when I volunteered to write some PERL scripts to analyze a few of our log files to try and point out some obvious performance issues with our massive application. It had been a long time (several years) since I had written any PERL, but it quickly came back to me and I was able to write a couple of log analysis scripts that have helped immensely. I was quickly invited to be a member of the team that would look over that, and other, analysis reports and make recommendations as to changes that should be made to the application and our approach.

It's really neat to be able to see this stage of the programming life cycle. At my previous job, we never had any truely large projects that needed this kind of attention. A lot of the performance analysis was done before I was part of the project, or I was put on small projects where performance was simply not an issue. While I am not part of the entire development life cycle on this large project, it is fascinating to be a part of this team. I really get to learn a lot about the J2EE specification, best practices, and how a large projects behaves much differently from a small project. I just never had to really worry about it before.

We are currently in the process of examining different data caching mechanisms and algorithms, including using Entity Beans, HashMaps, and Stateless Sesion Beans. All of which I am really excited to be able to explore to a deeper depth than I have used them in the past.

Another way of improving performance we are currently looking into is using JMS to perform opperations asynchronously as apposed to in parallel. While I am not involved in the JMS discussions, we are also examining using different protocols to communicate between the 3 layers of the application.

Future reads to facilitate my understanding of what is happening and why include:
IBM's Top 10 J2EE Best Practices
Precise Java - The path to improvement

Others to come. If you have any suggestions, drop a comment and let me know.

Posted by doug at 09:35 AM | Comments (3)

May 24, 2004

Spam Comments

Lately, I have not had any problems with spam comments on my blog, even though I am not using MT-Blacklist or anything else. That all changed this weekend. I guess my pages are finally being indexed by the search engines or something, because I got a total of 36 spam comments so far. It took me over and hour on and off going through and deleting all of them. I find it really hard to believe that people actually click on those links, and therefore, making it worth the effort to write the script to create the spam comments. Guess it's time to install MT-Blacklist and change my comments.cgi file name.

Posted by doug at 01:14 PM | Comments (2)

May 20, 2004

EJB CMP Finders and flexibility

A few days ago, I was playing around with custom finders in an entity bean and ordering the output, etc. After some research and suggestions from John, I decided to scrap the custom finders and implement a stateless session bean that would do the queries for me. This makes weird joins, order by clauses, and logic based where clauses possible without using something that is container specific.

The stateless session bean queries the database and grabs a list of primary keys. The bean then calls the entity beans "findByPrimaryKey" finder to grab the individual entity beans. This will allow me to easily add paging to my results, without populating all X number of entity beans. I can grab only the 10 or so that I want, save time and memory, and provide for decent performance.

Posted by doug at 09:52 PM | Comments (0)

May 17, 2004

Hit 'em where it counts

I got a forwarded email from a friend today calling for a boycott of the gas and oil industry on Wed, May 19, 2004. My response is posted below:

Things like this may sound great on paper and in print, but in practice,they don't work. Problem is that everyone still drives those days and therefore, they need gas, so they fill up the day before. Studies have been done on the effectiveness of this type of "boycott", and it just shows that a few days before and a few days after, people buy more gas to make up for the loss over one day. Gas and oil companies are not effected by this. Unfortunately, the only way for something to effect them profoundly, is to shut the country down for one day. Close all stores, all businesses, and shut down the entire highway and road infrastructure. Not feasible. However, that is the only way to truelyhurt their bottom line.
Believe me, I would like for nothing more than to really stick it to them, this just isn't the way to do it.

Posted by doug at 09:33 AM | Comments (3)

May 15, 2004

ORDER BY with EJB-QL

While working on the website for Tobacco Palace, I ran into an issue with ordering the results of my queries. I am using JBoss 3.2.3 which follows the EJB 2.0 spec. This spec does not allow for ORDER BY clauses in it's custom finders for CMP Entity Beans. After some poking around, I found a few different suggestions. One was to ditch the custom finder and use a stateless session bean to do the queries. Not a bad solution, but I dont' know that I'm ready to go down that road yet. I have enough to do to just get this up and running. The second suggestion, was to create a view that did the ordering for you and then select from that, and not the underlying table. Not sure how this would work for inserts, updates and deletes. I decided to to persue that avenue either.
Another suggestion, was to use a J-Boss specific X-Doclet tag, @jboss.declared-sql. I decided to research this avenue.

The @jboss.declared-sql allows you to specify multiple tables for a "from clause", ordering of the resultset, setting limits, and a general nicer approach to writing the SQL if you are familar with SQL, and not necessarily the EJB-QL language.

Not much to it, just use the example below, and everything works wonderfully. I have not seen a noticible speed difference, but then again, I only have about 300 records in my database.

      * @ejb.finder
      *   signature = "java.util.Collection findByCategoryId(
      *        java.lang.Long category_id)"
      *   query = ""
      * @jboss.declared-sql
      *   from = "tbl_item"
      *   order = "item_name"
      *   where = "category_id = {0}"
      *   signature = "java.util.Collection findByCategoryId(
      *        java.lang.Long category_id)"
Posted by doug at 12:15 PM

Happy Birthday Paige!

I know I'm about a week late, but it took me that long to get the pictures up. And I still don't have the film ones developed :( Anyway, last weekend we went over to John and Claire's to celebrate their awesome deck and the first birthday of Paige. We had a great time. The weather could not have been better for mid May, and Paige was really enjoying all the attention she got. I can't wait until I get to experience these things with my own child. Only 6 more weeks until the due date!

Pictures are available.

Posted by doug at 09:47 AM | Comments (0)

May 14, 2004

Congratulations Jen and Michael!

Congratulations to Jen and Michael Mitton on the birth of their first child, Ethan Michael. He arrived yesterday, (May 13, 2004), at 8:06P.M. weighing in at 7lbs 4oz and 21 inches in length. I guess now our child to be will have another playmate. Yeah!

Stacey already has a picture up over at her site.

Congratulation again!

Posted by doug at 12:11 PM | Comments (1)

May 10, 2004

Weird X Keyboard Mappings

I've had X running beautifully on my Dell Inspiron 8200 for a while now, but noticed that I was unable to switch to a normal text console once I logged into X. I asked my trusty friend John what was going on and he said he had the same problems before. It was my X keyboard mappings that were all screwed up. Very simple fix:

doug@proteus doug $ setxkbmap us

Now I can switch back and forth between X and a normal text console to view my logging console without problems.

Posted by doug at 09:45 AM | Comments (0)