Ehcache Server and Standalone Server have been released to Sourceforge Downloads. The server provides RESTful and SOAP APIs to Ehcache. It is available as a WAR which works with all app servers, or standalone using Glassfish V3 embedded.
New in this release is integration with Terracotta Server Array for coherent, scalable and HA caching. Also the Ehcache core has been upgraded to version 2.0, Jersey to 1.1.5, Metro to 2.1.5 and for standalone, Glassfish to V3 embedded.
This release has been performance tested against memcache and gives comparable over-the-network performance. Coupled with the simplicity of coding in your HTTP client of choice in your programming language of choice and easily getting the benefits of Terracotta Server Array backing it, this is a killer combination.
See the Ehcache Server documentation to get started or download it now.
Due to an issue with external repository handling, these have not yet been released to Maven. Sonatype are completing a project for Sun whereby they will be adding their artifacts to the Central repository. This is expected to be completed this week or next, so the Maven artifacts will be released then.
Interestingly, it can take a little bit of work to tune your Java HTTP client for speed. The following code snippet shows two recommended optimisations for the Apache HTTP client: turning off the staleness check (you would catch the exception on connection clone in production code and open a new one) and ignoring cookies.
HttpClient httpClient = new HttpClient(); httpClient.getParams().setParameter("http.connection.stalecheck", false); for (int i = 0; i < cacheOperations; i++) { String url = new StringBuffer(cacheUrl).append('/').append(keyBase).append(i).toString(); HttpMethod httpMethod = new GetMethod(url); httpMethod.getParams().setCookiePolicy(CookiePolicy.IGNORE_COOKIES); httpClient.executeMethod(httpMethod); } LOG.info(cacheOperations + " gets: " + stopWatch.getElapsedTime() + "ms");
5 comments
Comments are closed.