jackrabbit-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Santiago Gala <santiago.g...@gmail.com>
Subject Re: Evaluating jackrabbit use for media content
Date Thu, 24 Oct 2013 15:02:51 GMT
On Thu, Oct 24, 2013 at 12:24 AM, Alexander Klimetschek

> On 23.10.2013, at 08:00, Santiago Gala <santiago.gala@gmail.com> wrote:
> > With this caveat, multi byterange support does not look like it is
> working.
> > My second test:
> >
> > $ curl -v -u admin:admin -H "Range: bytes=0-20,21-63"
> > http://localhost:8080/index.html
> > ....
> > As curl points, the response has no chunk transfer encoding, no
> > Content-Length, no "Connection: close". This is violation of HTTP, one of
> > the three things is required or the client gets confused, as you see here
> > (I had to use Ctrl-C to make the test end).
> Ok, you might want to report the issue with multi-byte requests on
> https://issues.apache.org/jira/browse/SLING, thanks! AFAIK, the code was
> taken from Apache Tomcat, and was considered stable, but you never know.

The issue is not with sling, but with curl. A multipart/* entity is
properly delimited, the --delimiter-- token marks end of it, as RFC2616
clearly says: "Unlike in RFC 2046, the epilogue of any multipart message
MUST be empty; HTTP applications MUST NOT transmit the epilogue (even if
the original multipart contains an epilogue). These restrictions exist in
order to preserve the self-delimiting nature of a multipart message- body,
wherein the "end" of the message-body is indicated by the ending multipart

 I'm looking for the place to report it to curl so that it correctly
interprets the end boundary as ending a multipart HTTP response...

> The common single-range support should work fine though, we use that here.
> One important use case was html5 video, where browsers use http ranges for
> progressive streaming, and that works well.

This is the main case we need to support, nice to know that it has already
been tested to work. :)

> > I stilll need to find out if handling of binaries is done
> > efficiently, without copying to java.io.tmpdir or reading into memory,
> and
> > a number of other tests.
> It does not create a temp file, it uses InputStream.skip() (see
> StreamRendererServlet#copyRange) to get the ranges, which in case of a
> FileDataStore in Jackrabbit boils down to a random access on the underlying
> file. Pretty efficient.
Cool. We will quite possibly use JCR for the metainformation, and a
separate PUT request to fill the video in, or GET to read it, so I'm no
longer much concerned about the copying of binaries between client and
server done by jackrabbit remoting in java code...

> > Also, sling has way too many dependencies that are
> > completely out of scope for our requirements, and getting it trimmed down
> > to something about the size of jackrabbit would be needed...
> I understand - if that's the only reason you'd need Sling for, this is
> probably overkill. You might be able to take the code as an example for a
> custom servlet. OTOH, if you are doing web app stuff on top of JCR, Sling
> is really a good option - only Jackrabbit itself, even if it comes with
> WebDAV and other things, is usually pretty limiting if you want to expose
> JCR over the web. And RMI is definitely something to avoid over the network.
We are taking a look to sling, and I guess that a OSGI trimmed down sling
can work as a foundation for our media repository...

> Cheers,
> Alex

Regards, I'll keep you informed of our results

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message