Wednesday 10 August 2011

Transactions enhancements in 5.0

Besides other cool features such as Map reduce and distributed executors, Infinispan 5.0.0 "Pagoa" brings some significant improvements around transactional functionality:
  • transaction recovery is now supported, with a set of tools that allow state reconciliation in case the transaction fails during 2nd phase of 2PC. This is especially useful in the case of transactions spreading over Infinispan and another resource manager, e.g. a database (distributed transactions). You can find out more on how to enable and use transaction recovery here.
  • Synchronization enlistment is another important feature in this release. This allows Infinispan to enlist in a transaction as an Synchronization rather than an XAResource.This enlistment allows the TransactionManager to optimize 2PC with a 1PC where only one other resource is enlisted with that transaction (last resource commit optimization). This is particularly important when using Infinispan as a 2nd level cache in Hibernate. You can read more about this feature here.
  • besides that several bugs were fixed particularly when it comes to the integration with a transaction manager - BIG thanks to the community for reporting and testing them!
To summarise, Infinispan can participate in a transaction in 3 ways:
  1. as a fully fledged XAResource that supports recovery
  2. as an XAResource, but without recovery. This is the default configuration
  3. and as an Synchronization
In order to analyze the performance of running Infinispan in different transactional modes I've enhanced and used Radargun. The diagram below shows a performance comparison between running Infinispan in all the 3 modes described. The forth plot in the chart shows the performance of running Infinispan without transactions - this gives an idea about the cost of using transactions vs. raw operations.



The benchmark was run on this Radargun configuration, using Infinispan 5.0.0.CR5 configured as shown here. As a TransactionManager JBossTS 4.15.0.FINAL was used, configured with a VolatileStore as shown here. Each node was an 4-core Intel(R) Xeon(R) CPU E5640 @ 2.67GHz, with 4GB RAM.
Each transaction spread over only one put operation. The chart shows the following:
  • a non-transactional put is about 40% faster than a transactional one
  • Synchronization-enlisted transactions outperform an XAResource enlisted one by about 20%
  • A recoverable cache has about the same performance as a non-recoverable cache when it comes to transactions.
And that's not all! During Infinispan 5.0.0 development we've been thinking a lot about how we can improve transactional throughput, especially in scenarios in which multiple transactions are writing on the same key. As a result we've come up with some improvement suggestions summarised here: please feel free to take a look and comment!

Cheers,
Mircea

Friday 5 August 2011

Infinispan 5.0.0.FINAL has hit the streets!

So here we have it - Infinispan 5.0 Pagoa has been released.  This is a big, big release over 4.2.x, with over 45 new features (including the much more robust PUSH-based rehashing, XA recovery, smart L1 invalidation and virtual nodes) and over 30 bugs squashed, including several critical performance and stability related ones.  Major new programming models are supported too - from Spring and CDI through to OSGi, map/reduce and distributed code execution.

Pagoa has gone through over six months of development, the first alpha being made publicly available in December 2010, and 8 whole release candidates since the end of April this year.  This is the most stable, fastest, feature-rich version of Infinispan to date.  Pagoa has been integrated in other products, projects, frameworks and services - including the lightning-fast JBoss AS 7 - and we expect to see much, much more in this regard.

Pagoa really is a community-centric release.  I've seen loads of participation, from users, system integrators, extension-authors, researchers and academics, framework authors, and PaaS providers.  This participation has taken the form of providing feedback and bug reports through to profiler analysis; from helping with documentation and demos through to contributing major new features; from suggesting ideas and improvements to participating in detailed design meetings.  It is this participation that really helps Infinispan grow and mature, and at the same time innovate, taking us one step closer to becoming the best damn data grid out there.

So, a big thank you to everyone who participated, this really is your release.

As usual, download the release, provide feedback, read through the detailed changelog.  And check out our brand-new documentation site too!!  :-)

Finally, in other news, I recently blogged about Brahma, the codename for Infinispan 5.1. Yes, work has already started here, expect Brahma to be a real firecracker.  Check out the post, vote for your most desired features.  Brahma will also form the basis of Red Hat's Enterprise Data Grid product, which was announced in May.  You'll finally have a fully supported open source data grid!

Enjoy!
Manik