From mboxrd@z Thu Jan 1 00:00:00 1970 Delivered-To: chneukirchen@gmail.com Received: by 10.142.191.1 with SMTP id o1cs133838wff; Mon, 14 Dec 2009 20:38:03 -0800 (PST) Received: from mr.google.com ([10.90.7.11]) by 10.90.7.11 with SMTP id 11mr1754809agg.14.1260851883052 (num_hops = 1); Mon, 14 Dec 2009 20:38:03 -0800 (PST) Received: by 10.90.7.11 with SMTP id 11mr236472agg.14.1260851881652; Mon, 14 Dec 2009 20:38:01 -0800 (PST) X-BeenThere: rack-devel@googlegroups.com Received: by 10.204.151.83 with SMTP id b19ls1301600bkw.2.p; Mon, 14 Dec 2009 20:37:59 -0800 (PST) Received: by 10.204.24.81 with SMTP id u17mr103016bkb.15.1260851879636; Mon, 14 Dec 2009 20:37:59 -0800 (PST) Received: by 10.204.24.81 with SMTP id u17mr103015bkb.15.1260851879611; Mon, 14 Dec 2009 20:37:59 -0800 (PST) Return-Path: Received: from dcvr.yhbt.net (dcvr.yhbt.net [64.71.152.64]) by gmr-mx.google.com with ESMTP id 11si345092bwz.7.2009.12.14.20.37.59; Mon, 14 Dec 2009 20:37:59 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of normalperson@yhbt.net designates 64.71.152.64 as permitted sender) client-ip=64.71.152.64; Received: from localhost (dcvr.yhbt.net [127.0.0.1]) (using TLSv1 with cipher DHE-RSA-AES128-SHA (128/128 bits)) (No client certificate requested) by dcvr.yhbt.net (Postfix) with ESMTPSA id 8B7021F503; Tue, 15 Dec 2009 04:37:58 +0000 (UTC) Date: Tue, 15 Dec 2009 04:37:58 +0000 From: Eric Wong To: rack-devel@googlegroups.com Subject: Re: [ANN/RFC] LMGTWTY - Web Sockets for Rack+Rainbows! Message-ID: <20091215043758.GB29127@dcvr.yhbt.net> References: <20091211201958.GD2121@dcvr.yhbt.net> <20091213205355.GB30229@dcvr.yhbt.net> <20091214184227.GB12789@dcvr.yhbt.net> <102BE9BA-FC74-4C5C-A37B-A526C0E7A010@gmail.com> MIME-Version: 1.0 In-Reply-To: <102BE9BA-FC74-4C5C-A37B-A526C0E7A010@gmail.com> User-Agent: Mutt/1.5.18 (2008-05-17) X-Original-Authentication-Results: gmr-mx.google.com; spf=pass (google.com: best guess record for domain of normalperson@yhbt.net designates 64.71.152.64 as permitted sender) smtp.mail=normalperson@yhbt.net X-Original-Sender: normalperson@yhbt.net 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/1214d460ed982748 X-Message-Url: http://groups.google.com/group/rack-devel/msg/7df6df4ce92a9f91 Sender: rack-devel@googlegroups.com List-Unsubscribe: , List-Subscribe: , Content-Type: text/plain; charset=us-ascii Content-Disposition: inline James Tucker wrote: > On 14 Dec 2009, at 18:42, Eric Wong wrote: > > James Tucker wrote: > >> On 14 Dec 2009, at 00:23, Lakshan Perera wrote: > >>> This is awesome! Thanks for coming up something like this, in a > >>> short period of time. I hope this would be part of Rack, which > >>> would enable all Ruby Frameworks to work effortlessly with > >>> WebSockets. > >> > >> I really want to work out an abstraction away from IO instances, #read > >> and #write for this stuff. It's highly coupled, getting in the way of > >> tests, and heavy lifting environments. I have big plans for Rack 2.0 > >> to remove all IO that has not been properly abstracted and decoupled > >> from implementation details, but that's a long way off, mostly due to > >> lack of time and incentive. In the meantime, I can implore you all to > >> take steps in the right direction :-) > > > > Huh? I don't see what the problem with IO instances/semantics is, > > especially with the availability of StringIO for testing. "rack.input" > > is clearly specified and works fine as-is IMHO, though the rewindability > > requirement does add some unnecessary overhead. > > I disagree with "works fine". It does not work fine with Thin, in > fact, on the contrary, it forces some real ugliness into the system. I > also think that StringIO is a really unfortunate thing to have to > resort to, as it has so many short comings. Mind elaborating? I do not see what's ugly about it[1]. I haven't used Thin with uploads much, but I do have apps that handle lots of large uploads (via curl -T to make PUT requests) with Unicorn and Mongrel before that. StringIO isn't perfect (can't stat/select/chmod on it), but for Rack tests it's plenty alright... [1] - I admit to having a Unix bias here where nearly everything is a file, or ought to be :) -- Eric Wong