Thursday, 21 August 2008

JBCS Beta 1 released!

Some of you who may have read this blog a few weeks ago might have been excited to hear about JBoss Cache Searchable. For those of you who don't know about it - it provides a query interface on JBoss Cache. That is to say, you can now search the cache!

Why is this so cool?

You don't need to hang onto your keys to get objects out of the cache. Plus, you can now get multiple results from the cache from searching (e.g. all people named "Steve") whereas traditionally you will only get a specific object out (e.g. "Steve Jones"). Previously, the major difference between a cache and a database was the fact that you could not query it - and we've just changed that :).

Beta 1 for JBoss Cache Searchable is now out, so have a look, play around and let us know what you think about it. For more information, look at the wiki. This is available for download on SourceForge.

Also, I got to make my first proper presentation about this ( wOOt!) and it was to a team of developers at Sri Lanka's biggest mobile phone network - Dialog. Yeah you guys may not have Sri Lanka pop into your minds for cutting-edge technology (even if you know where it is) but these guys do have about 4 million subscribers and may soon use JBCS on a multi-million dollar project to maintain subscriber profiles. I have attached a pdf version if anyone wants to have a look.

'Til later,
Navin.

3 comments:

Hardy Ferentschik said...

Great work, Navin :)

Unknown said...

Can it be searched if used as a 2nd Level Hibernate Cache? I could imagine it's tricky, but it would be great that worked with some kind of magic.

Unknown said...

Yes, great work, Navin!

daniel, I'm a noob myself when it comes to JBoss Cache Searchable, but I do know a lot about how Hibernate uses JBC -- so take this for what it's worth ;)

I don't think the 2nd Level Cache is effectively searchable at this point. This is because each entity is stored in the cache in its own node, with a single key/value pair, key="ITEM", value= an Object[] containing the object's persistent fields. That's not really searchable; the data you'd want to search is all packed in an Object[]. To make it searchable, Hibernate would have to change the 2nd level caching API to pass in info about the field names associated with each element in the array.

Also, if you did search the cache, you'd only see the data that happened to be cached, which likely isn't the complete data set.