Friday, September 18, 2009

GemFire RubyGem (activesupport-gemfirecache)

So i finally got around to building my first Ruby gem, activesupport-gemfirecache. Its with a very cool distributed memory fabric called Gemfire. Its a java based distributed cache application, which has a fairly easy to use Java API. Since we are using Jruby/Rails I thought it would be an interesting project to try to build a custom Rails Cache store that can be used natively from within Rails. This is one of the real nice things about JRuby, is being able to call native Java libraries.

So I finally got version 0.0.5 out and so far it seems to work !

>> Rails.cache.region.getName
=> "RubyGemFireCacheStore"
>> Rails.cache.write('test1','adam1')
=> true
>> Rails.cache.read('test1')
=> "adam1"

Check it out here http://github.com/denen99/activesupport-gemfirecache