Tuesday 21 August 2007

Month of Bugs - results

The recently-run Month of Bugs has proved to be a very useful tool in helping get a lot of testing and hardening on the Habanero CRs leading up to releasing.

As promised, prize winners have now been contacted, and I'd like to thank you all for your valuable contributions and participation. I do see this mechanism as a useful and effective thing to do prior to major releases, and quite possibly something we'd repeat in the future. :-)

Cheers,
Manik

Full time dev on JBoss Cache

Red Hat has just hired contributor and committer Mircea Markus to work on JBoss Cache full-time. Much needed as well, given the roadmap for 2.1.0, 3.0.0, etc. :-)

Welcome aboard Mircea, viva "professional open source"!

Cheers,
Manik

Sunday 19 August 2007

Hidden gems in JBoss Cache 2.0.0.GA

JBoss Cache 2.0.0.GA is out and as you can see from Manik's last entry, we're already moving forward...and fast. Before JBoss Cache 2.0 is forgotten, let's have a quick glance at some hidden gems that came within it:

1.- Singleton Cache Store Functionality

Cache stores are backend stores for data handled within JBoss Cache. Until now, the main two strategies to configure these cache stores were:

  • sharing a cache store between all JBoss Cache instances.
  • each instance having its own cache store.
Each strategy has its own caveats. For example, what if an user wanted to use a file based shared cache store, but the file system (i.e. shared NFS) did not support concurrent access/updates to it? An alternative solution would have been to configure JBoss Cache so that for each instance to had its own cache store. However, the user would have gone from having to manage/maintain one cache store to having to maintain N cache stores. Singleton Cache Store functionality was designed and developed to respond to the demands of such end users.

When cache loaders, which interact with cache stores, are configured for singleton store, only the JBoss Cache instance in the coordinator of cluster interacts with the cache store. The rest of nodes replicate changes to the coordinator which is in charge of putting them in the store. When such coordinator leaves the cluster, or stops working, a new coordinator is elected which takes charge of communicating with the cache store. This allows for only one JBoss Cache instance to interact with the cache store at a time.

More information on Singleton Cache Store functionality and configuration options can be found in the JBoss Cache 2.0 documentation.

2.- Transforming Cache Loaders

In JBoss Cache 2.0, the format of the data stored in the File and JDBC cache loaders has been changed so that it uses the JBoss Cache marshaling framework, created to improve replication efficiency, to format data to be stored in these cache stores.

At JBoss, division of Red Hat, we think about our product's end users and when implementing such data format change, we realised that some of JBoss Cache's users might have populated cache stores in JBoss Cache 1.x format. Even though JBoss Cache 2.0 is a major release, we wanted to provide our a way to transform existing cache stores from 1.x format to 2.x format. Because of this, we created a set of one-off Transforming Cache Loaders whose job is:
  • read data from cache stores the way we did in JBoss Cache 1.x
  • write data to cache stores in JBoss Cache 2.x format.
Together with this, an example was created which recursively reads the contents of the cache store via these Transforming Cache Loaders, and stores the data read back into the cache store. Just run this example with the parameters of your cache loader and the entire cache store will be transformed.

The Transforming Cache Loaders, necessary libraries to understand JBoss Cache 1.x and example mentioned can be found within the JBoss Cache 2.0.0.GA distribution ZIP file that can be downloaded from here.

More information on Transforming Cache Loaders can be found in the JBoss Cache 2.0 documentation.

Wednesday 15 August 2007

JBoss Cache changes

Since releasing Habanero, I've been busy changing a few things around the way the source tree is managed (it was getting pretty messy). Basically, a lot of this revolves around JBCACHE-1142 which involves a number of changes. Let's take these one at a time.


1. Source code repository

We've moved from CVS to subversion. Still hosted on JBoss.org though, the main driver behind this was to be able to move files and directory structures around and not lose revision history.

Details of how to access the new repository are on the JBoss Cache wiki - committer rights have been carried across from CVS.


2. Structure

We've split POJO Cache into a separate module for easier dependency management. So now jbosscache-core and jbosscache-pojo can be built separately. See the wiki link above for more details.



3. Build tool

We've ditched ant in favour of Maven2. This affects the way the project is built and the way deliverables are created, but makes dependency management that much easier. So after a few hair-tearing days getting it to behave just the way I wanted it, we're finally ready here. Details of how to use Maven2 to build JBoss Cache are in the README-maven.txt file in the src tree.


4. TestNG

We're in the process of ditching the ageing JUnit 3.8-based test suite in favour of one based on TestNG. The reason behind this decision is so we can group and parameterise tests better, so that more combinations are tested (E.g., a test can be annotated as transactional and using a cache loader, and the test will be run with every combination of cache loader and transaction manager configured in the suite). The end result here will be a much more robust and well-tested product.


5. Preferred distribution

While we will still upload ZIPs onto SourceForge, we're trying to encourage users to use JBoss Cache using our Maven2 repository (and snapshot repo), to make dependency management easier.

An important point to note is that we've also standardised the groupId and artifactId used to org.jboss.cache and jbosscache-core (or jbosscache-pojo) respectively.


6. JBoss Cache 2.1.0 Alegrias

I had asked for suggestions for naming JBoss Cache 2.1.0 on the dev mail list, and have decided on Alegrias, courtesy of Galder Zamarreno. From Galder's email:


It's a type of very spicy chilli pepper from La Rioja in Spain, the same region from which the best spanish red wine comes.

http://www.thetapaslunchcompany.co.uk/products/vegetables/COR2101

Alegrias means happiness in plural, but in this case, they're trying to highlight tears of happiness ;)

So with that, I'd like to thank everyone who helped with Habanero and look forward to your participation on Algerias.

Cheers,
Manik Surtani



Wednesday 8 August 2007

JBoss Cache 2.0.0 (Habanero) in GA

Habanero's finally in GA. Thanks to everyone who waited patiently for this major release, and to everyone who contributed - in code, patches, docs, bug reports, suggestions, testing, everything.

A lot of credit goes to Jason Greene, who joined as POJO Cache lead midway during Habanero development. Without his efforts we wouldn't have a stable POJO Cache release!

This is a milestone for JBoss Cache, where we move to a new, much more flexible and powerful API, and better support for running outside of JBoss AS, either in standalone Java SE or other containers.

We will also soon be announcing winners in the recent "month of bugs" competition, so watch this space.

There is a brand new user guide and tutorial, please do give these a go even if you are an experienced JBoss Cache user.

Please visit the JBoss Cache downloads page, docs page and discuss this release on the user forums.

Enjoy!
Manik