« October 2004 | Main | December 2004 »
November 26, 2004
Getting IntelliJ 4.52 and 4.5.3 working on Linux AMD64/JDK1.5
There are a couple of small problems with debugging. Until these are fixed by JetBrains it is worth pointing them out:libbreakgen.so
Remove this from IntelliJ-IDEA-4.5.3/bin. It is a 32 bit binary and needs to be replaced with a 64 bit one. Removing it causes no loss in functionality.idea.lax
Add -Didea.no.launcher=true to the following line in idea.lax:lax.nl.java.option.additional=-Xms32m -Xmx256m -Dsun.java2d.noddraw=true -Didea.system.path="~/.IntelliJIdea/system" -Didea.config.path="~/.IntelliJIdea/config" -Didea.popup.weight=heavyThats it. Everything then works perfectly.
Posted by gluck at 07:22 PM | Comments (3)
November 25, 2004
A very easy way to make your HttpUnit tests run much faster
I have been looking at the performance of our web integration tests lately. They are an order of magnitude slower than our EJB integration tests.
JavaScipt!
It turns out 70% of the time taken by HttpUnit is setting up the JavaScript interpreter for each response. Some tests need this but not many. In your method where you create your default WebConversation just turn off the JavaScript as follows:
HttpUnitOptions.setScriptingEnabled(false); WebConversation conversation = new WebConversation();
And then turn it on with HttpUnitOptions.setScriptingEnabled(true) for those WebConversations that need it.
On a test page on an AMD64 we went from 7 seconds to 1.5 for 200 test runs with this change only.
The next culprit: dom4J
We also create a DOM using dom4j in order to do XPath evaluation. This is also VERY expensive. Removing this gives about the same level of improvement. The new HttpUnit 1.6 makes resorting to XPath a little less necessary. We will gradually phase it out.
Posted by gluck at 04:51 AM | Comments (0)
November 24, 2004
ehcache-1.1 released
23 November 2004
ehcache 1.1 released. This version splits out the constructs
package into a separate sub-project. This simplifies ehcache for those
using it in Hibernate or directly. It also moves the constructs to a
separate jar and release cycle. There is only 1 minor bug fix but then
there was only one bug reported.
See the release notes and full changelog here.
Posted by gluck at 02:45 AM | Comments (1)
November 23, 2004
Anouncing ehcache-constructs
Announcing ehcache-constructs-0.5. A subproject of ehcache, ehcache-constructs builds on top of ehcache to create implementations for common caching patterns. All implementations use ehcache as the backing cache. They also share a common purpose - to create very high performance Java applications.
At present ehcache-constructs contains:
General Purpose Caching
- BlockingCache - a cache which blocks subsequent threads until the first read thread populates a cache entry
- SelfPopulatingCache - a read-through cache. A cache that populates elements as they are requested without requiring the caller to know how the entries are populated. It also enables refreshes of cache entries without blocking reads on the same entries.
- UpdatingSelfPopulatingCache - a read-through cache. A cache that populates elements as they are requested without requiring the caller to know how the entries are populated. The cache entry is automatically updated on subsequent reads.
- SelfPopulatingCollectionsCache - a SelfPopulatingCache that adds threading safety where it is known in advance that all entries will be collections.
Web Caching
Servlet 2.3 caching filters that cache HTTP/S responses:
- CachingFilter - an abstract, extensible caching filter.
- SimplePageCachingFilter - a concrete implementation which caches pages based on the request URI and Query String.
- SimplePageFragmentCachingFilter - a concrete implementation which caches page fragments based on the request URI and Query String.
See the ehcache-constructs subsite for an overview, documentation, javadoc, clover test coverage and more.
Posted by gluck at 09:57 PM | Comments (0)
Announcing JPAM
JPAM is a Java-PAM bridge. PAM, or Pluggable Authentication Modules, is a standard security architecture used on Unix, Linux and Mac OS X systems.
JPAM permits the use of PAM authentication facilities by Java applications running on those platforms.
These facilities include:
- account
- auth
- password
- session
JPAM has its own proprietary API via the PAM class but also supports JAAS with a LoginModule implementation.
Binaries are available for:
- Linux 32 bit i386
- Linux 64 bit amd64
- Mac OS X ppc
Visit the JPAM website here
Posted by gluck at 09:45 PM | Comments (0)
November 16, 2004
Brave New World - The jump represented by Fedora Core 3 64 bit, AMD64 and JDK1.5.0
In the world of open source, it seems there are periods of inching forward punctuated by large jumps. I believe we are in the middle of one of those jumps now. In this post I argue that the combination of Fedora Core 3, AMD64, the emergence of Firefox, Java 5 64 bit makes for one of those jumps.
Fedora Core 3 x86_64
I have been a RedHat devotee for the last 5 years. Their decision to split the open source and commercial distros did not overly concern me. This technique was pioneered by the Mozilla project and has been used by many successful projects including Apple's Darwin.
When Fedora Core 2 came out I was quite disappointed. While it added the 2.6 kernel it's quality was much lower than FC1. There were freezing problems caused by power management that required boot-time options to workaround. It seems to me that the distribution's job is to shield users from these sorts of issues. If a user wants to use the vanilla kernel, they can download and compile it themselves.
With Fedora Core 3, the Fedora project has regained my confidence. It is fast, stable, slick, smooth and mature. I have been using it for the past week as both a user and as a developer, writing Java and C code. With Gnome 2.8 the user interface has many subtle user interface improvements. Desktop integration between the standard apps is improved. For example clicking on a mailto: link in Firefox smoothly opens a send new message dialog in Evolution 2.
I am running the x86_64 version of Fedora Core 3. It comes with 32 and 64 bit versions of libraries, and from what I can tell works well with both. I am using IntelliJ running a 32 bit version of JDK1.4.2. Our code is running JDK1.5.0 64 bit. I can step through my running app in 64 bit Java with my 32 bit Java IDE.
For many people Fedora Core 3 brings them up to date with a year of progress in Linux. There has never been a better time to take the plunge.
AMD64
AMD64 has been around for a while. The extreme server performance of the Opteron range has been leaking out slowly. In my own tests, we got a three times improvement in performance with no tuning.
On the desktop, AMD64 ushers in low-cost 64 bit computing. We just bought all the developers (myself included) new AMD64-based machines. They were AUD1600. We are now in the age of commodity 64 bit.
JDK1.5.0 for AMD64
Sun have partnered with AMD and one of the fruits of that partnership is JDK1.5.0's AMD64 support. The 2GB memory limit is now gone for Java.
The Reemergence of Web Standards
Two things are having an impact here. Firstly, the Mozilla project has finally triumphed with Firefox. This browser has captured the public imagination. Far from an overnight success it derives from years of work. As someone who has used it since Mozilla .9, and reported bugs against it, it is great for us that kept the candle alive to see it now. According to w3schools the Mozilla family is now at 18.6% browser share worldwide.
At this level Firefox must be supported. And as the most standards-compliant browser (74 out of a 100 cw IE's 39.5) ever, it means standards must be supported.
Tellingly, the web designers I work with love working with Firefox. The result is they develop on Firefox first and then "port" to IE.
Goooooooooooooooooooooooooooooooooooooogle
While Google's long term effect on computing is hard to gauge, the results up to now are:
- Microsoft has been prevented from extending its monopoly into searching
- Gmail is an attack on Microsoft Hotmail and frustrates its attempt to use the combination of Exchange and Hotmail to push its patented senderid scheme into SMTP.
- Desktop searching is an attack on the Microsoft heartland.
- Google are now hosting the Firefox homepage. There have been rumours flying about a Google branded distribution of Firefox with some funky extra features.
The whole effect is to curtail Microsoft. Google is an effective monopoly which advocates ethics compared with Microsoft, who were found guilty of abusing their market position in desktop operating systems.
By curtailing Microsoft, the secondary effect is to promote standards through computing. The Windows OS gets less important.
The Total Effect
The whole effect is a big leap forward. Linux is better than ever. It is now usable for a large percentage of the population. The decline of Microsoft and the reemergence of standards gives this most standards-compliant operating systems a fertile world in which to take root.
Thanks to AMD64, 64 bit Linux and 64 bit Java 5, commodity 64 bit computing is now here. With the exception of the Microsoft's monopoly extension play, the struggling .NET, you can do everything on it.
My hope is that all of this will trigger a mass migration of the fence sitters to the Linux way. If you are one, why not wade in, the water's warm.
Posted by gluck at 04:37 PM | Comments (0)
