Hi Matt, On Tue, 2017-10-03 at 18:34 -0400, Matt Ryan wrote: > Hi, > > I’d be interested in ideas on how we should define configuration for > delegate data stores for the CompositeDataStore. > > One idea was proposed on-list earlier in [0]. I like this idea, but > it is > a unified node-store/data-store configuration concept that might take > a bit > longer to support than we want to handle right now, and may be a bit > more > invasive than we want to tackle at this stage in the release. > > For my POC I did a really simple configuration format, like this: > > datastore.1=dataStoreName:FileDataStore,className:org.apache.jackrabb > it.oak.plugins.blob.datastore.OakCachingFDS,bundleName:org.apache.jac > krabbit.oak- > core,path:/Users/maryan/POCs/content_backflow_poc/ds_testing > datastore.2=dataStoreName:FileDataStore,className:org.apache.jackrabb > it.oak.plugins.blob.datastore.OakCachingFDS,bundleName:org.apache.jac > krabbit.oak- > core,path:/Users/maryan/POCs/content_backflow_poc/ds_production,readO > nly:true
Not a direct comment on the format, but I would advise against passing class names around, if at all possible. It's prone to class loading errors, especially in OSGi environments. You would need to get the right class loader from the originating bundle to make sure everything aligns correctly. I would suggest registering the DataStore instances as OSGi services with component properties and then looking them up using the Whiteboard abstraction. Robert
