Ehcache-1.4 beta Released

The beta version of ehcache-1.4 is available on sourceforge and the Maven central repository.
This version significantly enrichens the ehcache API and enhances extension of ehcache. The new features are:
You can now define CacheLoaders in the ehcache core API. They supplement the existing SelfPopulatingCache. They can be configured in ehcache.xml or programmatically. They can be used for cache warming, and simple pull-through caching. See the Cache Loaders chapter in the documentation for more details.
You can now define a CacheExceptionHandler and register it progammatically or in ehcache.xml. The enable an exception handler to be registered with a cache so that it is called on exception rather than the exception being thrown. See the Cache Exception Handler chapter in the documentation for more details.
You can now define CacheExtensions and register them progammatically or in ehcache.xml. A CacheExtension is a generic facility which holds a reference to a cache and is bound to the cache lifecycle, making possible a wide variety of extensions to behaviour. Usage examples are a cache refresh timer or a file monitoring mechanism. See the Cache Extensions chapter in the documentation for more details.
There are 5 minor bug fixes in the release. At the time of release there are no open bugs in ehcache.
See http://ehcache.sourceforge.net/ for more information.

Dynamic Proxy Performance

Ehcache 1.4, which is nearing completion, adds some user requested features such as ExceptionHandler(s). These are implemented in ehcache as dynamic proxies. One todo I have had is to investigate the performance degradation from use of same. An article by Brian Goetz (fellow JSR107 member) on IBM developerworks a few years ago predicted a 2x cost.
I have done some testing using a memory only cache in ehcache and come with a line ball. For ehcache afficianados, the test is in CacheTest.testProportionMemoryAndDiskPerformance. This is a test that protects against regression in ehcache by asserting outside times for variations in memory and disk store sizes. I added a memory only test using the new CacheExceptionHandler dynamic proxy.
It does 5000 puts and gets, sleeps for 500ms to give the hotspot compiler a chance to optimise, and repeats 10 times. Then it does the same for a dynamic proxy.
INFO: Time for MemoryStore: 120
Aug 19, 2007 5:10:52 PM net.sf.ehcache.CacheTest testProportionMemoryAndDiskPerformance
INFO: Time for MemoryStore: 123
Aug 19, 2007 5:10:53 PM net.sf.ehcache.CacheTest testProportionMemoryAndDiskPerformance
INFO: Time for MemoryStore: 63
Aug 19, 2007 5:10:53 PM net.sf.ehcache.CacheTest testProportionMemoryAndDiskPerformance
INFO: Time for MemoryStore: 40
Aug 19, 2007 5:10:54 PM net.sf.ehcache.CacheTest testProportionMemoryAndDiskPerformance
INFO: Time for MemoryStore: 128
Aug 19, 2007 5:10:55 PM net.sf.ehcache.CacheTest testProportionMemoryAndDiskPerformance
INFO: Time for MemoryStore: 30
Aug 19, 2007 5:10:55 PM net.sf.ehcache.CacheTest testProportionMemoryAndDiskPerformance
INFO: Time for MemoryStore: 131
Aug 19, 2007 5:10:56 PM net.sf.ehcache.CacheTest testProportionMemoryAndDiskPerformance
INFO: Time for MemoryStore: 29
Aug 19, 2007 5:10:56 PM net.sf.ehcache.CacheTest testProportionMemoryAndDiskPerformance
INFO: Time for MemoryStore: 35
Aug 19, 2007 5:10:57 PM net.sf.ehcache.CacheTest testProportionMemoryAndDiskPerformance
INFO: Time for MemoryStore: 35
Aug 19, 2007 5:10:57 PM net.sf.ehcache.CacheTest testProportionMemoryAndDiskPerformance
INFO: Time for MemoryStore: 130
Mean: 86ms
Aug 19, 2007 5:10:58 PM net.sf.ehcache.CacheTest testProportionMemoryAndDiskPerformance
INFO: Time for exception handling MemoryStore: 69
Aug 19, 2007 5:10:59 PM net.sf.ehcache.CacheTest testProportionMemoryAndDiskPerformance
INFO: Time for exception handling MemoryStore: 46
Aug 19, 2007 5:10:59 PM net.sf.ehcache.CacheTest testProportionMemoryAndDiskPerformance
INFO: Time for exception handling MemoryStore: 91
Aug 19, 2007 5:11:00 PM net.sf.ehcache.CacheTest testProportionMemoryAndDiskPerformance
INFO: Time for exception handling MemoryStore: 158
Aug 19, 2007 5:11:00 PM net.sf.ehcache.CacheTest testProportionMemoryAndDiskPerformance
INFO: Time for exception handling MemoryStore: 69
Aug 19, 2007 5:11:01 PM net.sf.ehcache.CacheTest testProportionMemoryAndDiskPerformance
INFO: Time for exception handling MemoryStore: 51
Aug 19, 2007 5:11:02 PM net.sf.ehcache.CacheTest testProportionMemoryAndDiskPerformance
INFO: Time for exception handling MemoryStore: 137
Aug 19, 2007 5:11:02 PM net.sf.ehcache.CacheTest testProportionMemoryAndDiskPerformance
INFO: Time for exception handling MemoryStore: 39
Aug 19, 2007 5:11:03 PM net.sf.ehcache.CacheTest testProportionMemoryAndDiskPerformance
INFO: Time for exception handling MemoryStore: 45
Aug 19, 2007 5:11:03 PM net.sf.ehcache.CacheTest testProportionMemoryAndDiskPerformance
INFO: Time for exception handling MemoryStore: 38
Mean: 74ms
The result is that I cannot detect a performance differnece.
Maybe the reason is that ehcache just passes the requests on unless they throw an exception. We have
try {
invocationResult = method.invoke(ehcache, args);
} catch (Exception e) {
In Java 5 at least the cost seems to be negligle, even with an in-memory cache.

I finally figured out what Next G was good for

I am building a house in Northern New South Wales near the Queensland border in a mountainous area known as the Granite Belt. It is a wonderful area of Australia. As the local towns go it is in the middle of nowhere. I am building the house on the Maryland river adjacent to a gorge. It is surrounded by large beef properties and National Parks. It is at 800 metres, but is surrounded by mountain ridges.
The result is a wonderfully quiet and peaceful environment. The downside is that I am out of reach of the GSM phone system and ADSL.
As it turns out a Telstra copper cable runs through the property on its way to connecting a remote farm. I always thought I would just get that connected, but now it comes to it, the thought of sipping on a modem, or expecting guests to, leaves me wanting more.
I also thought that the privatisation of Telstra involved some concessions for people like me using the “Universal Access” principle that has long informed telecommunications policy in Australia. This currently manifests itself as the Australian Broadband Guarantee, where the government subsidises high speed Internet access to rates comparable to those in urban areas. (See http://www.dcita.gov.au/communications_for_business/news_and_events/australian_broadband_guarantee). Sadly no one from Telstra, even the local Telstra agency in Stanthorpe knew anything about it. I spent around an hour at two stores with the clerks madly searching. When I checked with Telstra I was looking at $500 per month for a Telstra satellite connection. There are some other players who are addressing this market such as activ8me (See http://www.activ8me.net.au/default.asp?contentID=527).
There is a new plan from the OPEL consortium, involving Singapore’s (I think government controlled) Singtel and Elders, an “agri-business” company. It will be interesting to see what that brings up. The contract was just awarded so I will be waiting a while. The network promises to cover 639,000 square kilometres. Australia has a surface area of 7686850, so this “rural” network will cover 8% of Australia. It will use WiMax. Sadly it will not reach my property due to its limited range of 8km and 16km (line of sight) (http://www.wimax.com/education/faq/faq31).
There is also HaleNet, a local telecommunications company founded by an ex-Telstra engineer. He is doing good business. He uses some wireless technology from Israel which has a range of 25 km but it relies on line of site. Due to the geography sadly this solution will not work.
A satellite service such as the one from active8me sounds ok, but satellite brings big latencies (240-290ms) due to the speed of light to the satellite in geostationary orbit (2 * 35,786km). I often ssh and use skype for voice calls, so this is far from good.
Somewhere in this investigation someone mentioned Next G as a potential solution. Because I do not get GSM, and because Telstra has had outrageous pricing for their mobile phone based data services, I had never considered it. Telstra has been filling TV screens and newspapers with all sorts of silly ads about their silly named “Next G” meaning to indicate that it was a 3.5 G or something network. A little like the Web 2.0, 3.0 fun and games. Anyway the ads show people uploading photos in a combi van, and personalities such as John McEnroe and Bob Geldof having telecommunication problems in their native countries and exclaiming “It would not happen in Australia”. From this very informative advertising everyone is of course supposed to realise that this product is a new remote access data solution, amongst other things. That realisation only took me a year.
Next G is actually an HSPDA (http://en.wikipedia.org/wiki/HSDPA) network built for Telstra by Ericsson (See http://www.ericsson.com/ericsson/press/releases/20061006-1079707.shtml). The interesting bit for me is that it operates at 850Mhz. The effect of the lower frequency is that it has a much larger coverage footprint than GSM and does not require line of site.
Telstra manage to provide an almost unusable coverage map (See http://www.telstra.com.au/mobile/networks/coverage/maps.cfm). It did not work properly on the Windows computer from the Telstra dealer in Stanthorpe. Strangely it worked better on my Mac in Safari. Unfortunately the map shows very few landmarks such as rivers. By contrast the Google map for the same area shows much more; even my property boundary and the track I have made into the house site! A few hours of map making on my part showed that I had coverage if I used an external antenna. I also later found out that a fencing contractor has a Next G phone and it worked in parts of the property.
So, what sort of antenna? Cutting this rather long blog post somewhat shorter the usual Internet research showed people get good results from a Yagi antenna. I have ordered one from Comnet Solutions (See http://store.comnet.com.au/details/821268.html). It has to be pointed in the direction of the antenna, or maybe in my case the best echo.
Now what about Telstra and their outrageous pricing? The Telstra MobileNet pricing is still outrageous. In a byzantine twist if you use the ModMax modem (See http://www.maxon.com.au/products_modmax_overview.php) and no other, and if you get your data plan from BigPond, Telstra’s ISP subsidiary, then you can get something that though still terrible, is at least doable. You can get 200MB download for $39.95. or 1Gb for $49.95. (See http://bigpond.broadbandguide.com.au/wireless/high-speed/plans) Doable compared with $500 per month for satellite from Telstra, which is what the Newmarket Telstra shop brought up for me. Interestingly this pricing matches that from active8me for the same data amounts. So maybe Telstra are signed up to the Broadband Guarantee, even though no one at Telstra outside of one person in product knows it.
For anyone who has read this far, are you beginning to feel like a system integrator? Me too. Makes me wish that Australia had a government-owned telecommunications provider that could provide low latency Internet services outside our major cities.