Rainbows! Rack HTTP server user/dev discussion
 help / color / mirror / code / Atom feed
From: James Tucker <jftucker-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
To: Rainbows! list <rainbows-talk-GrnCvJ7WPxnNLxjTenLetw@public.gmane.org>
Subject: Re: range requests and multipart responses
Date: Tue, 20 Jul 2010 10:21:15 +0100	[thread overview]
Message-ID: <71E4CB4E-365A-4A6B-85EA-9C24415E1234@gmail.com> (raw)
In-Reply-To: <20100720061803.GA8037-yBiyF41qdooeIZ0/mPfg9Q@public.gmane.org>


On 20 Jul 2010, at 07:18, Eric Wong wrote:

> Hi all,
> 
> Does anybody have real-world use cases of clients using Range: requests
> with multiple comma-delimited byte ranges (and thus expecting multipart
> responses)?  If not, I'm not going to bloat Rainbows! with it for now[1].
> 
> While being able to specify a single range is very useful for resuming
> failed downloads and for things who want to "peek" at magic patterns
> before requesting the rest of a file, I can't think of good use cases
> for having to deal with multipart responses.
> 
> Even if you were writing a FUSE-based filesystem over HTTP, it wouldn't
> even be useful for implementing preadv(2) since you can only specify a
> single offset there.
> 
> Maybe if you mmap() a FUSE-ed file and two threads access the same file
> in different parts at the *exact*same*time* the FUSE layer could be
> smart enough to make a single HTTP request instead of two? :)
> 
> 
> [1] - For the performance-minded, it's also tough to implement multipart
>      responses efficiently using any sendfile() implementation.
>      Our TCP_CORK support is far from optimal under Linux right now,
>      and not using TCP_CORK would be even less efficient with extra
>      multipart headers.  AFAIK, sendfilev() isn't available outside of
>      Solaris, either.

Does cork even help in real world use cases?

> 
> -- 
> Eric Wong
> _______________________________________________
> Rainbows! mailing list - rainbows-talk-GrnCvJ7WPxnNLxjTenLetw@public.gmane.org
> http://rubyforge.org/mailman/listinfo/rainbows-talk
> Do not quote signatures (like this one) or top post when replying

_______________________________________________
Rainbows! mailing list - rainbows-talk-GrnCvJ7WPxnNLxjTenLetw@public.gmane.org
http://rubyforge.org/mailman/listinfo/rainbows-talk
Do not quote signatures (like this one) or top post when replying


  parent reply	other threads:[~2010-07-20  9:26 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-07-20  6:18 Eric Wong
     [not found] ` <20100720061803.GA8037-yBiyF41qdooeIZ0/mPfg9Q@public.gmane.org>
2010-07-20  9:21   ` James Tucker [this message]
     [not found]     ` <71E4CB4E-365A-4A6B-85EA-9C24415E1234-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2010-07-20 18:54       ` Eric Wong
2010-09-03  3:26 russell muetzelfeldt

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://yhbt.net/rainbows/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=71E4CB4E-365A-4A6B-85EA-9C24415E1234@gmail.com \
    --to=jftucker-re5jqeeqqe8avxtiumwx3w@public.gmane.org \
    --cc=rainbows-talk-GrnCvJ7WPxnNLxjTenLetw@public.gmane.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this inbox:

	../../rainbows.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).