You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@chemistry.apache.org by Sascha Homeier <sh...@meyle-mueller.de> on 2014/09/18 11:10:12 UTC

[OpenCMIS] Possibility to disable chunked transfer encoding

Hello together,

is it possible to disable the chunked transfer encoding in Java OpenCMIS ?

I am asking because our Nginx based Connect-Cluster currently does not support Chunks and adjusting the Cluster affects our whole public available systems (also I am not sure if our FW will handle chunks properly).
On client side I already use non PartialContentStream to avoid chunks but I also noticed a „Length-Required“ exception when calling the query discovery service.
So now I am trying to estimate the efforts and benefits of either adjusting the Nginx cluster or disabling chunks at OpenCMIS (if possible at all).

Thx in advance.

Cheers
Sascha



Re: [OpenCMIS] Possibility to disable chunked transfer encoding

Posted by Sascha Homeier <sh...@meyle-mueller.de>.
Hi Florian,

thx for the quick response.

Now I understand your comment in https://issues.apache.org/jira/browse/CMIS-421 that chunks are used to deal with huge documents (at first I thought the other way round because of the slight overhead of every chunk).

Taking into account that we often deal with huge images at high resolutions and that other Clients like CmisSync also require chunked encoding I think it will be best to see if we can adjust our cluster in a future maintenance period.

Thx again.

Cheers
Sascha



Am 18.09.2014 um 14:41 schrieb Florian Müller <fm...@apache.org>>:

Hi Sascha,

To turn off chunking OpenCMIS would have to know how big the request body is before it sends it. The Content-Length header must be set before the request body is sent.
To determine the length, the body would have to be generated and stored somewhere. And here is the issue. The body can be fairly large, especially if it contains a document. Keeping it in main memory could become a problem if you want to upload a 5GB video file. So, OpenCMIS would have to put it into a temporary file and read it again afterwards. The performance impact would be immense.
To cut a long story short, there is no switch in OpenCMIS to disable chunking.

You can, however, implement your own HttpInvoker class. This class is responsible for the HTTP connection. You can implement all these things that I described above there and make sure that chunking is turned off.
Not sure if that solves your issue, though. You might have the same problem with other CMIS clients.


- Florian


Hello together,
is it possible to disable the chunked transfer encoding in Java OpenCMIS ?
I am asking because our Nginx based Connect-Cluster currently does not
support Chunks and adjusting the Cluster affects our whole public
available systems (also I am not sure if our FW will handle chunks
properly).
On client side I already use non PartialContentStream to avoid chunks
but I also noticed a „Length-Required“ exception when calling the
query discovery service.
So now I am trying to estimate the efforts and benefits of either
adjusting the Nginx cluster or disabling chunks at OpenCMIS (if
possible at all).
Thx in advance.
Cheers
Sascha


Re: [OpenCMIS] Possibility to disable chunked transfer encoding

Posted by Florian Müller <fm...@apache.org>.
Hi Sascha,

To turn off chunking OpenCMIS would have to know how big the request 
body is before it sends it. The Content-Length header must be set before 
the request body is sent.
To determine the length, the body would have to be generated and stored 
somewhere. And here is the issue. The body can be fairly large, 
especially if it contains a document. Keeping it in main memory could 
become a problem if you want to upload a 5GB video file. So, OpenCMIS 
would have to put it into a temporary file and read it again afterwards. 
The performance impact would be immense.
To cut a long story short, there is no switch in OpenCMIS to disable 
chunking.

You can, however, implement your own HttpInvoker class. This class is 
responsible for the HTTP connection. You can implement all these things 
that I described above there and make sure that chunking is turned off.
Not sure if that solves your issue, though. You might have the same 
problem with other CMIS clients.


- Florian


> Hello together,
> 
> is it possible to disable the chunked transfer encoding in Java 
> OpenCMIS ?
> 
> I am asking because our Nginx based Connect-Cluster currently does not
> support Chunks and adjusting the Cluster affects our whole public
> available systems (also I am not sure if our FW will handle chunks
> properly).
> On client side I already use non PartialContentStream to avoid chunks
> but I also noticed a „Length-Required“ exception when calling the
> query discovery service.
> So now I am trying to estimate the efforts and benefits of either
> adjusting the Nginx cluster or disabling chunks at OpenCMIS (if
> possible at all).
> 
> Thx in advance.
> 
> Cheers
> Sascha