Monday, 28 January 2008

GUI Demo for JBoss Cache

So I've decided to try my hand at writing Swing code. For a guy who loathes writing GUI code, Swing is particularly painful, but IntelliJ's excellent GUI designer came to the rescue, taking away most of the pain. Sure, the generated code may not be optimal, but hey - this isn't a web browser I'm writing!

So on to the demo. The motivation for this demo is primarily the number of people that ask for a visual demo when I do presentations and talks on JBoss Cache or clustering in general. Everyone likes to see a demo, but JBoss Cache just isn't a visual product.

So that's what this demo tries to do - give JBoss Cache a "face".

The demo can be downloaded from the JBoss Cache download page on Sourceforge. The first release of the demo - 1.0-BETA1 - bundles JGroups 2.6.1 and JBoss Cache 2.1.0.CR3. Requirements are minimal - just a Java 5 JDK.

It should be pretty simple and straightforward to use - unzip and run the run.sh script to launch the GUI. The first thing you will see is an unstarted cache:


Once you click the Start Cache button, you should see the contents of the default configuration file used with the cache instance.



Note that this is a read-only display of the configuration file used. If you wish to edit this, exit the GUI demo, edit the config file in /etc/ and start the GUI demo again.

Now ideally you'd want to start several instances of the GUI demo, to watch them form a cluster and share data. The title bar of the application shows you the local instance's Cluster Address and the number of members in the cluster:


And once you have a few instances going, clicking on the Cluster view tab will show you the cluster's topology, indicating which instance is the JGroups coordinator, the current instance, and, if buddy replication is enabled, which instances are your buddy backups.

Finally, using the Manipulate data tab, you can either enter specific data, or generate random data, and using the Data view tab, watch how this replicates across your cluster.


Simple as that, really.

Enjoy playing around with this tool, and please provide feedback on the JBoss Cache user forums.

Cheers,
Manik

1 comment:

Gadwin Co Inger said...

Amazing & Great informative blog,it gives very useful practical information to developer like me. Besides that Wisen has established as Best Hibernate Training in Chennai . or learn thru Online Training mode Hibernate Online Training | Java EE Online Training. Nowadays Hibernate ORM has tons of job opportunities on various vertical industry.