[Mondrian] SegmentCache SPI

Pedro Vale pedro.vale at webdetails.pt
Tue May 27 11:36:33 EDT 2014


For CDC (Community Distributed Cache), we take advantage of the SPI provided by Mondrian to add new SegmentCache - that's the way we enable Hazelcast as a caching engine for mondrian.
We've tried some approaches (changing the property programmatically at one point), but now we're using SegmentCache.SegmentCacheInjector to add our SegmentCache.

The issue we're facing with that approach is about timing. If Mondrian initializes the SegmentCache before CDC starts up, then adding a new SegmentCache will not work - the Hazelcast cache is not used. 
This seems to happen often when people have Saiku installed, because Saiku can be configured to load cube information on startup, which triggers the SegmentCache initialization.  

We made some experiments with java services and registering the SPI in META-INF/services so that Mondrian could pick it up when starting. Unfortunately, our SegmentCache is on the plugin class loader, which differs from Mondrian's class loader so it doesn't get picked up. It's not an option to have a jar with the SegmentCache in Mondrian's class path since there are a lot of dependencies to the rest of the CDC stack.

I suggested to Luc that since we have a custom ServiceDiscovery, we could change it to look not only on Mondrian's class path folder - some way we could configure ServiceDiscovery to scan other folders for jars.

Luc seems to be more inclined to developing a dynamic registry service where external caches can go online/offline.

Per Luc's suggestion, sending out this email to get more opinions and suggestions on how to approach (and if we should approach it).


Pedro Vale                            	
Webdetails Dev Lead  


-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.pentaho.org/pipermail/mondrian/attachments/20140527/d797bc31/attachment.html 

More information about the Mondrian mailing list