jackrabbit-oak-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Francesco Mari (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (OAK-8186) Create API in OAK for file access to binaries in the repository.
Date Wed, 10 Apr 2019 08:33:00 GMT

    [ https://issues.apache.org/jira/browse/OAK-8186?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16814195#comment-16814195
] 

Francesco Mari commented on OAK-8186:
-------------------------------------

[~mattvryan], my rule of thumb is that if something can be implemented below JCR without introducing
new, custom APIs, it will be implemented. If not, it should probably be implemented on top
of JCR.

It might be that this need for speed when accessing binaries is an actual requirement of the
application [~hsaginor@gmail.com] is implementing. In this case, [~hsaginor@gmail.com] should
probably choose different storage mediums for the different kind of data he is manipulating.
Maybe he should store some data directly on the file system, and just store a reference to
it (e.g. file paths) in JCR. If a user needs certain data access patterns that are not provided
by JCR, that user should better implement those data access pattern in his own code.

> Create API in OAK for file access to binaries in the repository.
> ----------------------------------------------------------------
>
>                 Key: OAK-8186
>                 URL: https://issues.apache.org/jira/browse/OAK-8186
>             Project: Jackrabbit Oak
>          Issue Type: Improvement
>            Reporter: Henry Saginor
>            Priority: Major
>         Attachments: FileCopyTest3.java, OAK File Access.jpg, fileCopyTest-0.0.1-SNAPSHOT.jar
>
>
> To get file access applications normally write binaries to temp files. It would be nice
if an API existed to get file access directly from OAK. This might also meet some use cases
documented at [https://wiki.apache.org/jackrabbit/JCR%20Binary%20Usecase]
> Suggested API and implementation can be found here [1]. Also, see attached diagram [2].
> I can create a patch if I can get some feedback. Note that suggested API makes it explicit
that a temp file is created. I am not sure if direct access to files in datasore would be
safe. But I am open to suggestions.
> [1]
>  [https://github.com/hsaginor/jackrabbit-oak/blob/directFileAccess/oak-api/src/main/java/org/apache/jackrabbit/oak/api/blob/FileReferencable.java]
>  [https://github.com/hsaginor/jackrabbit-oak/blob/directFileAccess/oak-api/src/main/java/org/apache/jackrabbit/oak/api/blob/TempFileReference.java]
>  [https://github.com/hsaginor/jackrabbit-oak/blob/directFileAccess/oak-api/src/main/java/org/apache/jackrabbit/oak/api/blob/TempFileReferenceProvider.java]
>  [https://github.com/hsaginor/jackrabbit-oak/blob/directFileAccess/oak-blob-plugins/src/main/java/org/apache/jackrabbit/oak/plugins/blob/datastore/FileDSBlobTempFileReference.java]
>  [https://github.com/hsaginor/jackrabbit-oak/blob/directFileAccess/oak-blob-plugins/src/main/java/org/apache/jackrabbit/oak/plugins/blob/datastore/DataStoreBlobStore.java]
>  [https://github.com/hsaginor/jackrabbit-oak/blob/directFileAccess/oak-segment-tar/src/main/java/org/apache/jackrabbit/oak/segment/SegmentBlob.java]
>  [https://github.com/hsaginor/jackrabbit-oak/blob/directFileAccess/oak-store-spi/src/main/java/org/apache/jackrabbit/oak/plugins/value/jcr/BinaryImpl.java]
> [2]
> !OAK File Access.jpg!



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Mime
View raw message