From mboxrd@z Thu Jan 1 00:00:00 1970 Delivered-To: chneukirchen@gmail.com Received: by 10.140.141.15 with SMTP id o15cs156025rvd; Thu, 4 Feb 2010 08:34:24 -0800 (PST) Received-SPF: pass (google.com: domain of 3DvdqSwgJCrskguvdlfshnbjm.dpnsbdl-efwfmhpphmfhspvqt.dpn@groups.bounces.google.com designates 10.101.141.11 as permitted sender) client-ip=10.101.141.11; Authentication-Results: mr.google.com; spf=pass (google.com: domain of 3DvdqSwgJCrskguvdlfshnbjm.dpnsbdl-efwfmhpphmfhspvqt.dpn@groups.bounces.google.com designates 10.101.141.11 as permitted sender) smtp.mail=3DvdqSwgJCrskguvdlfshnbjm.dpnsbdl-efwfmhpphmfhspvqt.dpn@groups.bounces.google.com; dkim=pass header.i=3DvdqSwgJCrskguvdlfshnbjm.dpnsbdl-efwfmhpphmfhspvqt.dpn@groups.bounces.google.com Received: from mr.google.com ([10.101.141.11]) by 10.101.141.11 with SMTP id t11mr1925509ann.42.1265301263558 (num_hops = 1); Thu, 04 Feb 2010 08:34:23 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlegroups.com; s=beta; h=domainkey-signature:received:x-beenthere:received:received:received :received:received-spf:received:received:received:mime-version :subject:from:in-reply-to:date:message-id:references:to:x-mailer :x-original-authentication-results:x-original-sender:reply-to :precedence:mailing-list:list-id:list-post:list-help:list-archive :x-thread-url:x-message-url:sender:list-subscribe:list-unsubscribe :content-type:content-transfer-encoding; bh=X9zBEpArNkk23WCJd64oGfQ67MTr+UXaxlwQEEemkfA=; b=bUFP26NlAwFT6LTXNw6q4HLw3tjmACH3VsvGj3WLh/JpL9myfr0z0Cp50InzVkcVuT DtBlGD4zLgVygXC/VQ9vhkePXZT4AhRXYTSiFL7uHtYm0EhKpiyEeNA1ULD9HtMdlKcz b8cTNf49Lh7gEwMIEv8IZDRuhrlJg8A2yziMA= DomainKey-Signature: a=rsa-sha1; c=nofws; d=googlegroups.com; s=beta; h=x-beenthere:received-spf:mime-version:subject:from:in-reply-to:date :message-id:references:to:x-mailer:x-original-authentication-results :x-original-sender:reply-to:precedence:mailing-list:list-id :list-post:list-help:list-archive:x-thread-url:x-message-url:sender :list-subscribe:list-unsubscribe:content-type :content-transfer-encoding; b=dokiW8qqG33QOC5FK1WflA5K4wiVAXD9KWcuoDP2lJSuzUjwSB4d5MLJetf5dKLf96 TTCKJbTKq1LtnjwUHo5ixHa8NsFAde8TfX61dk+cgAVcMHZDPgmG7LIx2mUIrkXiNor0 +K+5t5KcvM90SLBy7uvXBzV/aZdM4F/bBqtwg= Received: by 10.101.141.11 with SMTP id t11mr91429ann.42.1265301262173; Thu, 04 Feb 2010 08:34:22 -0800 (PST) X-BeenThere: rack-devel@googlegroups.com Received: by 10.213.50.10 with SMTP id x10ls487757ebf.3.p; Thu, 04 Feb 2010 08:34:20 -0800 (PST) Received: by 10.213.48.144 with SMTP id r16mr476537ebf.12.1265301260080; Thu, 04 Feb 2010 08:34:20 -0800 (PST) Received: by 10.213.48.144 with SMTP id r16mr476535ebf.12.1265301259985; Thu, 04 Feb 2010 08:34:19 -0800 (PST) Return-Path: Received: from ey-out-1920.google.com (ey-out-1920.google.com [74.125.78.147]) by gmr-mx.google.com with ESMTP id 18si33028ewy.4.2010.02.04.08.34.18; Thu, 04 Feb 2010 08:34:18 -0800 (PST) Received-SPF: pass (google.com: domain of jftucker@gmail.com designates 74.125.78.147 as permitted sender) client-ip=74.125.78.147; Received: by ey-out-1920.google.com with SMTP id 26so131579eyw.24 for ; Thu, 04 Feb 2010 08:34:18 -0800 (PST) Received: by 10.216.154.70 with SMTP id g48mr729318wek.109.1265301258716; Thu, 04 Feb 2010 08:34:18 -0800 (PST) Return-Path: Received: from ?192.168.1.101? (bb-87-81-237-21.ukonline.co.uk [87.81.237.21]) by mx.google.com with ESMTPS id p10sm863483gvf.28.2010.02.04.08.34.17 (version=TLSv1/SSLv3 cipher=RC4-MD5); Thu, 04 Feb 2010 08:34:17 -0800 (PST) Mime-Version: 1.0 (Apple Message framework v1077) Subject: Re: streaming api From: James Tucker In-Reply-To: Date: Thu, 4 Feb 2010 16:34:16 +0000 Message-Id: <29D9EAEB-5762-4E15-A998-B16186E1F8B2@gmail.com> References: <20100203105938.GA20037@dcvr.yhbt.net> <20100204103926.GA29636@dcvr.yhbt.net> <20100204104122.GB29636@dcvr.yhbt.net> To: rack-devel@googlegroups.com X-Mailer: Apple Mail (2.1077) X-Original-Authentication-Results: gmr-mx.google.com; spf=pass (google.com: domain of jftucker@gmail.com designates 74.125.78.147 as permitted sender) smtp.mail=jftucker@gmail.com; dkim=pass (test mode) header.i=@gmail.com X-Original-Sender: jftucker@gmail.com Reply-To: rack-devel@googlegroups.com Precedence: list Mailing-list: list rack-devel@googlegroups.com; contact rack-devel+owners@googlegroups.com List-ID: List-Post: , List-Help: , List-Archive: X-Thread-Url: http://groups.google.com/group/rack-devel/t/5146e2033cfabda2 X-Message-Url: http://groups.google.com/group/rack-devel/msg/36fb954b4d127871 Sender: rack-devel@googlegroups.com List-Subscribe: , List-Unsubscribe: , Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable On 4 Feb 2010, at 15:00, Tom Robinson wrote: >=20 > On Feb 4, 2010, at 2:41 AM, Eric Wong wrote: >=20 >> Eric Wong wrote: >>> Randy Fischer wrote: >>>>> Rack already lets you stream the body. The body response only has = to >>>>> respond to #each and the #each call can delay as much as it wants. = Ruby >>>>> 1.8 has (somewhat) cheap threads, and 1.9 has even cheaper Fibers = so >>>>> you can sleep synchronously inside them. >>>>>=20 >>>> I'm more interested in getting streaming content on the request >>>> side of things (go ahead and parse the headers, then just give >>>> me an IO object on the content). >>=20 >> Nevermind, I didn't notice the "request side" of things, I need sleep = :x >=20 > Also this PSGI interface allows for returning a response = *asynchronously*. Rack does not allow for async responses (e.x. long = polling) nor async streaming (e.x. streaming comet). Actually rack /allows/ for streaming bodies in the api, although = specific scheduling of the body rendering is restricted by middleware = code and the servers approach to body#each. That being said, the latter two do work /around/ racks api in Thin and = rainbows, although writing middleware for this api is not so trivial.