Hi Matt, thanks a lot for your answer.

If your storage is "local" (meaning it appears as a local filesystem to
> Oak), I'd probably use OakFileDataStore.  It implements SharedDataStore so
> you can share the same location with multiple instances.  For example if
> you create a file share on a NAS and then mount that share on multiple
> servers - even though the storage is across the network, it is mounted in
> the filesystem and appears local.  OakFileDataStore should work well for
> this purpose.


I think this would be the case: I will have one or more servers, each one
with one or more Oak instances (we handle several repositories), all
"using" the same file store. One customer has those servers in the same
intranet and another has them in Amazon. But in both cases I could mount a
folder that would be "visible" to all servers, right?

Do you think it would be best to use OakFileDataStore over, for example
CachingFileDataStore? to keep things "simple"?

As for DataStoreBlobStore - DataStoreBlobStore is a wrapper around a class
> that implements DataStore to make it look like a BlobStore.
>
> I have been using something like this to setup my repository, I do not
know if there is another way...

FileDataStore fds = new FileDataStore();
File dir = ...;
fds.init(dir.getAbsolutePath());
DataStoreBlobStore dsbs = new DataStoreBlobStore(fds);
DocumentNodeStore docStore = new MongoDocumentNodeStoreBuilder().
                    setMongoDB("mongodb://user:password@" + host + ":" +
port, "repo1", 16).
                    setClusterId(123).
                    setAsyncDelay(10).
                    setBlobStore(dsbs).
                    build();


Jorge


El vie., 21 feb. 2020 a las 16:36, Matt Ryan (<[email protected]>)
escribió:

> Hi,
>
> I think I probably will need a bit more information about your use case to
> know how to help you best; can you provide a bit more detail about your
> environment and what you are hoping to accomplish?
>
> If your storage is "local" (meaning it appears as a local filesystem to
> Oak), I'd probably use OakFileDataStore.  It implements SharedDataStore so
> you can share the same location with multiple instances.  For example if
> you create a file share on a NAS and then mount that share on multiple
> servers - even though the storage is across the network, it is mounted in
> the filesystem and appears local.  OakFileDataStore should work well for
> this purpose.
>
> The other common use case for a shared storage location is cloud-based
> storage, like AWS S3.  In this case use S3DataStore (for AWS S3) or
> AzureDataStore (for Microsoft Azure Blob Storage).
>
> Do you have a different use case than one of these?
>
>
> As for DataStoreBlobStore - DataStoreBlobStore is a wrapper around a class
> that implements DataStore to make it look like a BlobStore.  For reasons
> I'm not fully aware of (happened before my time - probably historical),
> binary object storage in Oak is usually available as an implementation of
> the Jackrabbit DataStore interface but Oak interacts with these as
> BlobStores.  You will usually set up your repository something like this:
>    DataStore ds = new OakFileDataStore(); // or whatever DataStore type you
> choose
>    ds.init(dataStoreHomeDirectory);
>    BlobStore blobStore = new DataStoreBlobStore(ds);
> Then you would use the blobStore to create the FileStore that your node
> store requires.
>
>
> -MR
>
> On Fri, Feb 21, 2020 at 2:03 PM jorgeeflorez . <
> [email protected]>
> wrote:
>
> > Hi,
> > I am trying to pick one data store with the purpose of avoiding binary
> > storage in MongoDB blobs collection. I would like to know which should I
> > choose to be used in production.
> > I have explored a bit (1.12 version) and my guess is that
> > DataStoreBlobStore should be used when you want to store files in a local
> > directory (one oak instance only accessing the files) whereas
> > CachingFileDataStore should be used if the folder where you want to store
> > files is located in another host and can be seen from the machine running
> > Oak (several Oak instances can be accessing the files). Is this correct?
> >
>

Reply via email to