From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on dcvr.yhbt.net X-Spam-Level: X-Spam-ASN: AS14383 205.234.109.0/24 X-Spam-Status: No, score=0.0 required=3.0 tests=MSGID_FROM_MTA_HEADER shortcircuit=no autolearn=unavailable version=3.3.2 Path: news.gmane.org!not-for-mail From: James Tucker Newsgroups: gmane.comp.lang.ruby.rainbows.general Subject: Re: range requests and multipart responses Date: Tue, 20 Jul 2010 10:21:15 +0100 Message-ID: <71E4CB4E-365A-4A6B-85EA-9C24415E1234@gmail.com> References: <20100720061803.GA8037@dcvr.yhbt.net> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 (Apple Message framework v1081) Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Trace: dough.gmane.org 1279618025 31342 80.91.229.12 (20 Jul 2010 09:27:05 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Tue, 20 Jul 2010 09:27:05 +0000 (UTC) To: Rainbows! list Original-X-From: rainbows-talk-bounces-GrnCvJ7WPxnNLxjTenLetw@public.gmane.org Tue Jul 20 11:27:03 2010 Return-path: Envelope-to: gclrrg-rainbows-talk@m.gmane.org X-Original-To: rainbows-talk-GrnCvJ7WPxnNLxjTenLetw@public.gmane.org Delivered-To: rainbows-talk-GrnCvJ7WPxnNLxjTenLetw@public.gmane.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:content-type:mime-version :subject:from:in-reply-to:date:content-transfer-encoding:message-id :references:to:x-mailer; bh=Mmv5VvPqarI7F6AiZ0UMcEc+7oTwhqAhTp5IPM214vE=; b=nk895Gp73MhvTh9yGp6FFv4IOr0rd/ANRQb92VsuFRFqcKf11vb8jWqnTbzVrjkNli izLnPm/uyhcSQedmf3DNOvfX1cymCaGf9+KvJ8sCwJkOnPDW/L7PDp0EN2Lq8eIf11AB vDzO42c9G/oK+cOtK1oBrodbEQBZ2UUrAM2Ys= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=content-type:mime-version:subject:from:in-reply-to:date :content-transfer-encoding:message-id:references:to:x-mailer; b=IHiA6FL4TUFGshX0y4x6kFp5Hx6MoDmRAiE32ljEjPY8S4t1SurDaJ+N30N0VD+hLs ZGfd60sjvJ3UNCKqqRUd2raHm29jP3OQV2BvIy2Zc/xXBKsGkgCmK9C0v96xMA/zdnC4 g52UoQzYEahBwVyIycFdRX8psL6o24wqCAmLc= In-Reply-To: <20100720061803.GA8037-yBiyF41qdooeIZ0/mPfg9Q@public.gmane.org> X-Mailer: Apple Mail (2.1081) X-BeenThere: rainbows-talk-GrnCvJ7WPxnNLxjTenLetw@public.gmane.org X-Mailman-Version: 2.1.12 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: rainbows-talk-bounces-GrnCvJ7WPxnNLxjTenLetw@public.gmane.org Errors-To: rainbows-talk-bounces-GrnCvJ7WPxnNLxjTenLetw@public.gmane.org Xref: news.gmane.org gmane.comp.lang.ruby.rainbows.general:109 Archived-At: Received: from rubyforge.org ([205.234.109.19]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1Ob96G-0003Ft-FJ for gclrrg-rainbows-talk@m.gmane.org; Tue, 20 Jul 2010 11:26:56 +0200 Received: from rubyforge.org (rubyforge.org [127.0.0.1]) by rubyforge.org (Postfix) with ESMTP id 4A70D1858388; Tue, 20 Jul 2010 05:26:53 -0400 (EDT) Received: from mail-ew0-f50.google.com (mail-ew0-f50.google.com [209.85.215.50]) by rubyforge.org (Postfix) with ESMTP id 3EECC1858388 for ; Tue, 20 Jul 2010 05:26:43 -0400 (EDT) Received: by ewy4 with SMTP id 4so1735127ewy.23 for ; Tue, 20 Jul 2010 02:26:43 -0700 (PDT) Received: by 10.213.25.145 with SMTP id z17mr2775320ebb.84.1279617678095; Tue, 20 Jul 2010 02:21:18 -0700 (PDT) Received: from [192.168.1.103] (bb-87-81-237-21.ukonline.co.uk [87.81.237.21]) by mx.google.com with ESMTPS id a48sm51262204eei.0.2010.07.20.02.21.17 (version=TLSv1/SSLv3 cipher=RC4-MD5); Tue, 20 Jul 2010 02:21:17 -0700 (PDT) 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