[jira] [Commented] (JCR-4335) API for direct binary access

2018-07-25 Thread Marcel Reutegger (JIRA)


[ 
https://issues.apache.org/jira/browse/JCR-4335?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16555219#comment-16555219
 ] 

Marcel Reutegger commented on JCR-4335:
---

Julian added the missing file in r1836578.

> API for direct binary access
> 
>
> Key: JCR-4335
> URL: https://issues.apache.org/jira/browse/JCR-4335
> Project: Jackrabbit Content Repository
>  Issue Type: New Feature
>  Components: jackrabbit-api
>Reporter: Marcel Reutegger
>Assignee: Marcel Reutegger
>Priority: Major
> Fix For: 2.18, 2.17.5
>
> Attachments: JCR-4335-v2.patch, JCR-4335-v3.patch, JCR-4335.patch, 
> JCR-4335.patch
>
>
> Jackrabbit Oak proposes to add a new direct binary access capability to the 
> repository. One part of the proposal is to expose this new capability in the 
> Jackrabbit API. For details see OAK-7569 and OAK-7589.



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


[jira] [Commented] (JCR-4335) API for direct binary access

2018-07-24 Thread Matt Ryan (JIRA)


[ 
https://issues.apache.org/jira/browse/JCR-4335?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16554708#comment-16554708
 ] 

Matt Ryan commented on JCR-4335:


Hmm.  Somehow my last patch file missed an entire Java file, 
`JackrabbitValueFactory.java` in `jackrabbit-api`.  My apologies for that.   
[^JCR-4335-v3.patch] contains the missing file.  [~mreutegg] / [~reschke] will 
one of you please apply that file also to the committed changes?

> API for direct binary access
> 
>
> Key: JCR-4335
> URL: https://issues.apache.org/jira/browse/JCR-4335
> Project: Jackrabbit Content Repository
>  Issue Type: New Feature
>  Components: jackrabbit-api
>Reporter: Marcel Reutegger
>Assignee: Marcel Reutegger
>Priority: Major
> Fix For: 2.18, 2.17.5
>
> Attachments: JCR-4335-v2.patch, JCR-4335-v3.patch, JCR-4335.patch, 
> JCR-4335.patch
>
>
> Jackrabbit Oak proposes to add a new direct binary access capability to the 
> repository. One part of the proposal is to expose this new capability in the 
> Jackrabbit API. For details see OAK-7569 and OAK-7589.



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


[jira] [Commented] (JCR-4335) API for direct binary access

2018-07-24 Thread Julian Reschke (JIRA)


[ 
https://issues.apache.org/jira/browse/JCR-4335?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16554513#comment-16554513
 ] 

Julian Reschke commented on JCR-4335:
-

trunk: [r1836570|http://svn.apache.org/r1836570]

> API for direct binary access
> 
>
> Key: JCR-4335
> URL: https://issues.apache.org/jira/browse/JCR-4335
> Project: Jackrabbit Content Repository
>  Issue Type: New Feature
>  Components: jackrabbit-api
>Reporter: Marcel Reutegger
>Assignee: Marcel Reutegger
>Priority: Major
> Fix For: 2.18, 2.17.5
>
> Attachments: JCR-4335-v2.patch, JCR-4335.patch, JCR-4335.patch
>
>
> Jackrabbit Oak proposes to add a new direct binary access capability to the 
> repository. One part of the proposal is to expose this new capability in the 
> Jackrabbit API. For details see OAK-7569 and OAK-7589.



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


[jira] [Commented] (JCR-4335) API for direct binary access

2018-07-24 Thread Matt Ryan (JIRA)


[ 
https://issues.apache.org/jira/browse/JCR-4335?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16554415#comment-16554415
 ] 

Matt Ryan commented on JCR-4335:


Updated [^JCR-4335-v2.patch] attached which matches the latest [pull 
request|https://github.com/apache/jackrabbit/pull/59].

> API for direct binary access
> 
>
> Key: JCR-4335
> URL: https://issues.apache.org/jira/browse/JCR-4335
> Project: Jackrabbit Content Repository
>  Issue Type: New Feature
>  Components: jackrabbit-api
>Reporter: Marcel Reutegger
>Assignee: Marcel Reutegger
>Priority: Major
> Fix For: 2.18, 2.17.5
>
> Attachments: JCR-4335-v2.patch, JCR-4335.patch, JCR-4335.patch
>
>
> Jackrabbit Oak proposes to add a new direct binary access capability to the 
> repository. One part of the proposal is to expose this new capability in the 
> Jackrabbit API. For details see OAK-7569 and OAK-7589.



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


[jira] [Commented] (JCR-4335) API for direct binary access

2018-07-24 Thread Matt Ryan (JIRA)


[ 
https://issues.apache.org/jira/browse/JCR-4335?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16554411#comment-16554411
 ] 

Matt Ryan commented on JCR-4335:


I've updated the [pull request|https://github.com/apache/jackrabbit/pull/59] 
based feedback from [~mreutegg] and [~reschke].

> API for direct binary access
> 
>
> Key: JCR-4335
> URL: https://issues.apache.org/jira/browse/JCR-4335
> Project: Jackrabbit Content Repository
>  Issue Type: New Feature
>  Components: jackrabbit-api
>Reporter: Marcel Reutegger
>Assignee: Marcel Reutegger
>Priority: Major
> Fix For: 2.18, 2.17.5
>
> Attachments: JCR-4335.patch, JCR-4335.patch
>
>
> Jackrabbit Oak proposes to add a new direct binary access capability to the 
> repository. One part of the proposal is to expose this new capability in the 
> Jackrabbit API. For details see OAK-7569 and OAK-7589.



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


[jira] [Commented] (JCR-4335) API for direct binary access

2018-07-24 Thread Matt Ryan (JIRA)


[ 
https://issues.apache.org/jira/browse/JCR-4335?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16554408#comment-16554408
 ] 

Matt Ryan commented on JCR-4335:


{quote}Q: how much of these upload URIs actually vary? That is, do they have a 
long common prefix? (The part about the URIs being signed might mean "no"...)
{quote}
I'm afraid the answer is "no" as you suspected.  In my experience, the scheme, 
hostname, and path would all remain the same, but from that point on (query 
params) they would begin to vary.  The bulk of the length of these long URIs is 
probably in the query string - probably about 80% of the total length or more.  
The parameters can differ (for example, some require different "upload" or 
"part" IDs) and the signature then is different also.

It might be possible to gain some efficiency at the expense of increased 
complexity - and higher possibility of error - for clients making use of the 
URIs.

> API for direct binary access
> 
>
> Key: JCR-4335
> URL: https://issues.apache.org/jira/browse/JCR-4335
> Project: Jackrabbit Content Repository
>  Issue Type: New Feature
>  Components: jackrabbit-api
>Reporter: Marcel Reutegger
>Assignee: Marcel Reutegger
>Priority: Major
> Fix For: 2.18, 2.17.5
>
> Attachments: JCR-4335.patch, JCR-4335.patch
>
>
> Jackrabbit Oak proposes to add a new direct binary access capability to the 
> repository. One part of the proposal is to expose this new capability in the 
> Jackrabbit API. For details see OAK-7569 and OAK-7589.



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


[jira] [Commented] (JCR-4335) API for direct binary access

2018-07-23 Thread Julian Reschke (JIRA)


[ 
https://issues.apache.org/jira/browse/JCR-4335?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16552681#comment-16552681
 ] 

Julian Reschke commented on JCR-4335:
-

Q: how much of these upload URIs actually vary? That is, do they have a long 
common prefix? (The part about the URIs being signed might mean "no"...)

> API for direct binary access
> 
>
> Key: JCR-4335
> URL: https://issues.apache.org/jira/browse/JCR-4335
> Project: Jackrabbit Content Repository
>  Issue Type: New Feature
>  Components: jackrabbit-api
>Reporter: Marcel Reutegger
>Assignee: Marcel Reutegger
>Priority: Major
> Attachments: JCR-4335.patch, JCR-4335.patch
>
>
> Jackrabbit Oak proposes to add a new direct binary access capability to the 
> repository. One part of the proposal is to expose this new capability in the 
> Jackrabbit API. For details see OAK-7569 and OAK-7589.



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


[jira] [Commented] (JCR-4335) API for direct binary access

2018-07-20 Thread Matt Ryan (JIRA)


[ 
https://issues.apache.org/jira/browse/JCR-4335?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16550887#comment-16550887
 ] 

Matt Ryan commented on JCR-4335:


{quote} - do we really need to parametrize sizes and number of parts? I 
understand that the implementation doing the upload needs this, but why does it 
appear in the API?{quote}
I think they are necessary.  There are a few reasons for stating the number of 
parts, but they mostly center on the impact to a resulting JSON document, for 
example.

Assume a JavaScript browser client is interacting with a web endpoint that, in 
turn, is invoking this API.  The JavaScript client wants to upload a binary 
directly, so it is requesting instructions on how to do that from the web 
endpoint.  The web endpoint would then call this API and obtain a 
{{BinaryUpload}} object that it then converts into a JSON document to return to 
the JavaScript client.  The JavaScript client or the web endpoint may have 
limitations on the size of the JSON document that it can support.

IIRC, Azure allows up to 10,000 upload parts in a multi-part upload.  S3 is 
even higher at 50,000.  In my testing, I've seen signed URIs over 500 
characters long.  If a client were unable to specify the number of parts, a 
list of 10,000 upload URIs of over 500 characters each would exceed 5MB in a 
JSON document just for the list of URIs itself.  This may or may not be a 
problem; only the client would know whether accepting a document that large is 
problematic.

The expected size of the upload is also needed for similar reasons, based on 
what the service provider capabilities are.  Some service providers require 
multi-part uploads for binaries above a certain size.  Some do not allow 
multi-part uploads of binaries smaller than a certain size.  Both Azure and S3 
have limits as to the maximum size of a binary that can be uploaded.

If the implementation knows the expected upload size and the number of parts 
the client can accept, then it can determine whether it is possible to perform 
this upload directly or whether the client will need to try to upload it 
through the repository as has been done traditionally.  For example if the 
client wants to upload a 300MB binary but does not support multi-part 
uploading, if the service provider requires multi-part uploading above 250MB 
then this upload request will fail so the client cannot upload this binary 
directly to storage.  However, the Oak backend may be able to handle this 
upload without problems so it could be uploaded the traditional way.

> API for direct binary access
> 
>
> Key: JCR-4335
> URL: https://issues.apache.org/jira/browse/JCR-4335
> Project: Jackrabbit Content Repository
>  Issue Type: New Feature
>  Components: jackrabbit-api
>Reporter: Marcel Reutegger
>Assignee: Marcel Reutegger
>Priority: Major
> Attachments: JCR-4335.patch, JCR-4335.patch
>
>
> Jackrabbit Oak proposes to add a new direct binary access capability to the 
> repository. One part of the proposal is to expose this new capability in the 
> Jackrabbit API. For details see OAK-7569 and OAK-7589.



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


[jira] [Commented] (JCR-4335) API for direct binary access

2018-07-20 Thread Julian Reschke (JIRA)


[ 
https://issues.apache.org/jira/browse/JCR-4335?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16550372#comment-16550372
 ] 

Julian Reschke commented on JCR-4335:
-

It's a bit unfortunate to have a complex API addition here, but no actual 
implementation or tests (I understand that's in Oak, but still...).

That said:

- there are a few cases where null is returned when something isn't available; 
AFAIR in the JCR API we usually throw UnsupportedOperationsExceptions instead 
(so this is a consistency thing)
- terminology: "MIME type" should be "(internet) media type" and "encoding" 
should be "character encoding". (Yes, the JCR properties have somewhat 
misleading names)
- the claim that the encoding doesn't matter for non-text types is not really 
true. For instance "application/xml" has a charset parameter, but "text/vcard" 
does not
- it's unclear to me how the choice of disposition type can be made by the user 
of the API (as opposed to, for instance, a system-wide policy)

Furthermore it seems to me that the whole API surface is big but still leaves 
essential information out. Such as:

- do we really need to parametrize sizes and number of parts? I understand that 
the implementation doing the upload needs this, but why does it appear in the 
API?
- the API currently returns a set of upload URIs, but is completely silent 
about how to use them

> API for direct binary access
> 
>
> Key: JCR-4335
> URL: https://issues.apache.org/jira/browse/JCR-4335
> Project: Jackrabbit Content Repository
>  Issue Type: New Feature
>  Components: jackrabbit-api
>Reporter: Marcel Reutegger
>Assignee: Marcel Reutegger
>Priority: Major
> Attachments: JCR-4335.patch, JCR-4335.patch
>
>
> Jackrabbit Oak proposes to add a new direct binary access capability to the 
> repository. One part of the proposal is to expose this new capability in the 
> Jackrabbit API. For details see OAK-7569 and OAK-7589.



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


[jira] [Commented] (JCR-4335) API for direct binary access

2018-07-20 Thread Julian Reschke (JIRA)


[ 
https://issues.apache.org/jira/browse/JCR-4335?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16550330#comment-16550330
 ] 

Julian Reschke commented on JCR-4335:
-

in svn patch format: 
https://issues.apache.org/jira/secure/attachment/12932374/JCR-4335.patch

> API for direct binary access
> 
>
> Key: JCR-4335
> URL: https://issues.apache.org/jira/browse/JCR-4335
> Project: Jackrabbit Content Repository
>  Issue Type: New Feature
>  Components: jackrabbit-api
>Reporter: Marcel Reutegger
>Assignee: Marcel Reutegger
>Priority: Major
> Attachments: JCR-4335.patch, JCR-4335.patch
>
>
> Jackrabbit Oak proposes to add a new direct binary access capability to the 
> repository. One part of the proposal is to expose this new capability in the 
> Jackrabbit API. For details see OAK-7569 and OAK-7589.



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


[jira] [Commented] (JCR-4335) API for direct binary access

2018-07-19 Thread Matt Ryan (JIRA)


[ 
https://issues.apache.org/jira/browse/JCR-4335?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16550262#comment-16550262
 ] 

Matt Ryan commented on JCR-4335:


I've attached [^JCR-4335.patch] in case a patch file is preferred to a GitHub 
pull request.

> API for direct binary access
> 
>
> Key: JCR-4335
> URL: https://issues.apache.org/jira/browse/JCR-4335
> Project: Jackrabbit Content Repository
>  Issue Type: New Feature
>  Components: jackrabbit-api
>Reporter: Marcel Reutegger
>Assignee: Marcel Reutegger
>Priority: Major
> Attachments: JCR-4335.patch
>
>
> Jackrabbit Oak proposes to add a new direct binary access capability to the 
> repository. One part of the proposal is to expose this new capability in the 
> Jackrabbit API. For details see OAK-7569 and OAK-7589.



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


[jira] [Commented] (JCR-4335) API for direct binary access

2018-07-19 Thread Matt Ryan (JIRA)


[ 
https://issues.apache.org/jira/browse/JCR-4335?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16550261#comment-16550261
 ] 

Matt Ryan commented on JCR-4335:


The proposed changed has been implemented can be viewed [on 
GitHub|https://github.com/apache/jackrabbit/pull/59].

This proposed change has been reviewed for the past few weeks with 
contributions and input by [~reschke], [~mreutegg], [~mduerig], 
[~alexander.klimetschek] and others.  I humbly propose that we consider this 
change for addition to Jackrabbit.

> API for direct binary access
> 
>
> Key: JCR-4335
> URL: https://issues.apache.org/jira/browse/JCR-4335
> Project: Jackrabbit Content Repository
>  Issue Type: New Feature
>  Components: jackrabbit-api
>Reporter: Marcel Reutegger
>Assignee: Marcel Reutegger
>Priority: Major
>
> Jackrabbit Oak proposes to add a new direct binary access capability to the 
> repository. One part of the proposal is to expose this new capability in the 
> Jackrabbit API. For details see OAK-7569 and OAK-7589.



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