May 17, 2013
As part of a load testing project, I needed to collect and store data as fast as possible in a multi-threaded environment. This meant synchronizing on collections to avoid collisions. Synchronization is always a bad idea in any performance critical application. In my simple testing, adding to a synchronized ArrayList can be almost 4x slower than a non-synchronized ArrayList. Then, I had an interesting idea of what would be faster: a synchronized list or a hash map keyed off the local thread id? In my testing, the map was actually faster as it required no synchronization…almost 2x faster. It is still slower than non-synchronized list, understandably so, but it at least gets to within 2x worse. The hash map example works since upon retrieval, you are guaranteed that the list being added to cannot collide except with itself as the list is tied to a specific thread. This is similar to a ThreadLocal, except ThreadLocal is even slower performance. The downfall of this method is that it assumes you are primarily concerned with ‘add’ and that reads only occur at the end at which point you have to merge. This also assumes that order does not matter. In my load testing project, all of that holds true. All I care about is storing metrics as fast as possible without colliding.
March 4, 2013
January 24, 2013
As mentioned in my previous post, this article series is around my Budget Analyzer application that I built using Grails and jQuery Mobile frameworks. I hope to present this as a more real world example of using Grails along with using jQuery Mobile for the client side responsible design that can scale to any sized client (phone, tablet, desktop, etc). The jQuery Mobile framework is an excellent library that simplifies that approach dramatically.
January 23, 2013
In this post, I will present one of my newest applications that I built using Grails and jQuery Mobile frameworks. I hope to present this as a more real world example of using Grails along with using jQuery Mobile for the client side responsible design that can scale to any sized client (phone, tablet, desktop, etc). The jQuery Mobile framework is an excellent library that simplifies that approach dramatically.
October 1, 2012
One of the recent additions to TeaTrove I am making is adding the
in operator. This may seem trivial, but they are quite powerful as well as generally better performing, not to mention easier to read. The SQL standard has had these operators for decades because they just make sense. I’m rather surprised by how many modern day languages do not have it. Many of the languages do have support for the
in operator, which is a good addition, but it’s not a suitable replacement as the
September 2, 2012
Although some would say there are two competing standards for handling live events on the web, websockets and server-sent events (event source), they are really very different from each other with their own use cases. I have always been a proponent of websockets as it is bi-directional and as a result more powerful. Although in reality, there are few cases where you truly need bi-directional support. Nonetheless, I’ve always been of the opinion of “what if” one day you need bi-directional support. It’s better to be on a platform today that supports it tomorrow. As a result, I’ve never had a good use case for server-sent events. Today, I came across one.
August 23, 2012
To Whom It May Concern at AT&T:
From the rest of the community who is fully confused by the latest announcement from AT&T concerning Facetime over 3G and the requirement for the new shared data plans, we would like to have some questions answered that would help to further solidify your position and rationale for this announcement.
August 7, 2012
Web applications in Java EE (and even SE) have many components from MDB configuration to JMS configuration to Servlet configuration to JPA/database configuration. Each of these components has their own methodology of configuration. Further, some are easier to manage than others. The reason this is important is when it comes to managing your environments from development to test to production. The most ideal situation is a single build and archive (WAR, EAR, etc) that you can deploy to any environment and change the settings at the container level. This blog article hopes to explain some methods of managing those configurations.
July 15, 2012
In the previous two blog articles (simple projects) (plugins), we touched on setting up standard Grails applications and plugins through Maven. In this article, we are going to talk about multi-module projects and how to build plugins and applications together as a single Maven build. (more…)
July 13, 2012
My last blog article explained using the Maven integration in the recently released 2.1 version of Grails on simple applications. Today, we are going to look at using the Maven integration and build, manage, and deploy plugins. Plugins and applications in Grails are very similar to each other. The big difference is that a plugin has a special plugin descriptor file named
* is the name of the plugin. Other than that, they behave very similar to each other. Plugins generally do not have as many dependencies, however, as they are not required to include the web application environment typically. (more…)