July 10, 2010
One of the frequent patterns I make use of for Java backend systems are transactional code blocks, and not transactional in the sense of JPA, Hibernate, Databases, etc. I mean generic transactional blocks in which you have to wrap a piece of code with a begin and end block. For example, JPA is just one [...]
April 29, 2010
One of my applications has several millions cacheable entries. In order to cache as much as possible without going back to the database I use both a memory store and a disk store in my Ehcache configuration. Loading a serialized item from disk is still faster than loading from a database generally. That being said [...]
October 7, 2009
I have a use case within my database schema that involves a one-to-one relationship. Typically, I map most of my tables with an automatic auto-incrementing primary key. The relationship table then has a single foreign key to its single relationship. This works great within Hiberante and HQL without issue. That is until you begin to [...]
October 7, 2009
MySQL has the notion of specifying a specific index to use when invoking queries in order to override the default provided by MySQL. Typically, MySQL selects the most optimized index based on the query. However, in some cases, it fails to pick properly reducing performance. In those cases, you need to use the keyword “use [...]
June 24, 2009
Eclipse Galileo has officially been released and with it comes multitudes of changes. Below are my favorites from the Platform, JDT, and Web Tools projects. For more information, including screenshots, see: http://download.eclipse.org/eclipse/downloads/drops/R-3.5-200906111540/eclipse-news.html http://www.eclipse.org/webtools/releases/3.1.0/newandnoteworthy/index.php Mac OSX Builds Use Cocoa and Sheets The platform now uses native cocoa-build SWT widgets, rather than the obsolete Carbon. This brings [...]
June 3, 2009
If you use any popular open source technologies, odds are they use or you have used the Apache Commons libraries. The following is a free e-book on using those various libraries. Common Java Cookbook
April 26, 2009
Spring is often times considered a web application library similar to the EJB 3.x stack. However, Spring is so much more and can live in standalone applications as well. Today I am going to touch on using Spring in standalone applications to handle dependency or configuration management. I do not mean configuration management in the [...]
April 13, 2009
We have now analyzed various open source NIO servers for performance and memory consumption. Per my quick, initial testing, only Grizzly, Mina, and Netty were comparable. Now, let’s analyze features and how each of these frameworks use them. For my purposes, I am going to be looking into the following features that I personally value [...]
April 9, 2009
As my ongoing investigation into picking a suitable and highly scalable server for my future applications, today I will be talking about memory. Yesterday, we discussed performance and saw in general how Netty and Grizzly compared to one another. Today, we will further extend that by comparing memory usage footprint at start, over time, and [...]
April 7, 2009
As a continuation of evaluating an NIO server for my iPhone game, I started with looking at pure performance. First, the following links provide already existant benchmarks: http://swamp.homelinux.net/blog/index.php/2009/03/03/performance-comparison-of-apache-mina-and-jboss-netty/ http://gleamynode.net/articles/2232/ http://mina.apache.org/performance-test-reports.html I took my own samples and quickly ran some basic tests as well to just get a really rough idea. Note that these metrics should [...]