Hi Chetan

Thanks a lot for the details.

On 5/19/14 1:05 PM, "Chetan Mehrotra" <[email protected]> wrote:

>On Mon, May 19, 2014 at 3:29 PM, Marc Pfaff <[email protected]> wrote:
>> For SegmentNodeStore my research
>> ends up in FileBlobStore and for the DocumentNodeStore it appears to be
>> the MongoBlobStore. Is that correct?
>
>SegementNodeStore does not uses BlobStore by default. Instead all the
>binary content is stored as part of segment data itself.
Ok, I see. I think can follow this when writing binaries using
SegmentNodeStore.createBlob(). But from looking at
SegmentNodeStore.getBlob(), I would expect it to fail if no blob store is
set. And apparently, SegmentNodeStore.getBlob() does not seem to be used
when reading binaries through JCR. I don't know how that works, need to
have a closer look first.

>Sofollowing
>points can be noted for BlobStore
>
>1. SegmentNodeStore does not require BlobStore by default
>2. DocumentNodeStore uses MongoBlobStore by default
>3. Both can be configured to use a BlobStore via OSGi config
>
>>* I was only able to find the FileBlobStoreService that registers the
>> FileBlobStore as an OSGi service. I was not able to find more BlobStore
>> implementations to be exposed in OSGi. Are there any more? And how about
>> the MongoBlobStore in particular?
>
>MongoBlobStore is not configured as an explicit service instead is
>used as the default fallback option if no other BlobStore is
>configured. As it just requires Mongo connection detail, it is
>currently configured along with MongoDocumentStore in
>DocumentNodeStore
Ok understand, makes sense.

>
>There is AbstractDataStoreService which wraps JR2 DataStore as
>BlobStore and configures and registers them with OSGi. it currently
>support FileDataStore and S3DataStore.
>
>Note that FileDataStore is currently preferred over FileBlobStore
Ok. I see that FileDataStore is as well exposed as BlobStore service using
the DataStoreBlobStore wrapper.

>
>> The DocumentNodeStoreService references the  same blob store service as
>> the SegmentNodeStoreService. As I'm not able to find the MongoBlobStore
>> exposed as service, does that mean the DocumentNodeStore uses the
>> FileBlobStore
>
>No. The MongoBlobStore is configured implicitly in
>org.apache.jackrabbit.oak.plugins.document.DocumentMK.Builder#setMongoDB(c
>om.mongodb.DB,
>int). So unless a BlobStore is explicitly configured DocumentNodeStore
>would use MongoBlobStore.
>
>> Both, the SegmentNodeStoreService and the DocumentNodeStoreService
>> appear to check for 'custom blob store' property but both components do
>> not expose such a property? And how would they select from a specific
>> BlobStore service?
>
>Here there is an assumption that system has only one BlobStore
>registered with OSGi Service Registry. If multiple BlobStore services
>are registered then you can possibly specify a specific one by
>configuring the 'blobStore.target' to the required OSGi service filter
>(DS 112.6 of OSGi Compedium)
Assuming same is true for NodeStore services.

Thanks a lot. 

Regards
Marc

>
>Chetan Mehrotra

Reply via email to