[Mondrian] SegmentCache SPI

Pedro Vale pedro.vale at webdetails.pt
Thu May 29 06:09:45 EDT 2014


In my perspective, the common use case is for Mondrian and CDC to run as components within the same container (the Pentaho platform).

I considered implementing a simple client that had no dependencies and communicated with CDC/Hazelcast in some fashion. My main drawback there is that I'd still need to push a jar into Mondrian's class path (the other drawback would be performance, but that could be mitigated). I'd like to avoid pushing jars into WEB-INF/lib (in the case of the Pentaho platform).

I agree with is a lifecycle problem, where adding a segment cache to Mondrian after Mondrian has started does not work. Making the registry service dynamic would make it work.

cheers,

Pedro Vale                            	
Webdetails Dev Lead  

http://www.webdetails.pt






A 29/05/2014, às 00:08, Julian Hyde <julianhyde at gmail.com> escreveu:

> It seems to me that this is a problem with lifecycle, whereas you’re dealing with it as a problem of code dependencies. Wouldn't it make more sense to treat the cache as a peer to Mondrian, rather than as a sub-ordinate component? So, Mondrian is just a client; it shouldn’t need the whole Hazelcast+CDC code on its stack, just the client.
> 
> I would be OK if Mondrian and Hazelcast ran as components within the same container, but having Hazelcast+CDC as a separately started and managed entity seems to be the normal case.
> 
> Julian
> 
> 
> On May 27, 2014, at 8:36 AM, Pedro Vale <pedro.vale at webdetails.pt> wrote:
> 
>> Hi.
>> 
>> 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).
>> 
>> thanks,
>> 
>> Pedro Vale                            	
>> Webdetails Dev Lead  
>> 
>> http://www.webdetails.pt
>> 
>> 
>> 
>> 
>> 
>> 
>> _______________________________________________
>> Mondrian mailing list
>> Mondrian at pentaho.org
>> http://lists.pentaho.org/mailman/listinfo/mondrian
> 
> _______________________________________________
> Mondrian mailing list
> Mondrian at pentaho.org
> http://lists.pentaho.org/mailman/listinfo/mondrian

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


More information about the Mondrian mailing list