From mboxrd@z Thu Jan 1 00:00:00 1970 MIME-Version: 1.0 In-Reply-To: <20101115051625.GD27578@opal.ai.ki> References: <20101115032531.GB27578@opal.ai.ki> <20101115051625.GD27578@opal.ai.ki> Date: Mon, 15 Nov 2010 00:26:50 -0500 Message-ID: From: John Floren To: Fans of the OS Plan 9 from Bell Labs <9fans@9fans.net> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Subject: Re: [9fans] 9p vs http Topicbox-Message-UUID: 7e901476-ead6-11e9-9d60-3106f5b1d025 On Mon, Nov 15, 2010 at 12:16 AM, Sam Watkins wrote: > On Sun, Nov 14, 2010 at 11:20:00PM -0500, John Floren wrote: >> Please see lsub's Op and my Streaming talk at the most recent IWP9. > > Ok, thanks. =C2=A0I did not know that 9p has latency problems even when r= eading a > single file. =C2=A0I was talking about pipelining, where you can ask the = server to > send a dozen files or chunks all of metadata all in a single packet. =C2= =A0As I > said, I think this might be useful even within a site. > > Do you think http has any disadvantages compared to 9p? > Could it be used instead of 9p in a similar role? > > > Example of http pipelining: > > client sends: > > =C2=A0 =C2=A0 =C2=A0 =C2=A0HEAD / HTTP/1.1 > =C2=A0 =C2=A0 =C2=A0 =C2=A0Host: iwp9.org > > =C2=A0 =C2=A0 =C2=A0 =C2=A0HEAD /slides/floren.pdf HTTP/1.1 > =C2=A0 =C2=A0 =C2=A0 =C2=A0Host: iwp9.org > > > server replies: > > =C2=A0 =C2=A0 =C2=A0 =C2=A0HTTP/1.1 200 OK > =C2=A0 =C2=A0 =C2=A0 =C2=A0Server: Plan9 > =C2=A0 =C2=A0 =C2=A0 =C2=A0Date: Mon, 15 Nov 2010 05:06:10 GMT > =C2=A0 =C2=A0 =C2=A0 =C2=A0ETag: "2e3c1v24" > =C2=A0 =C2=A0 =C2=A0 =C2=A0Content-Length: 10382 > =C2=A0 =C2=A0 =C2=A0 =C2=A0Last-Modified: Fri, 15 Oct 2010 14:14:24 GMT > =C2=A0 =C2=A0 =C2=A0 =C2=A0Content-Type: text/html > > =C2=A0 =C2=A0 =C2=A0 =C2=A0HTTP/1.1 200 OK > =C2=A0 =C2=A0 =C2=A0 =C2=A0Server: Plan9 > =C2=A0 =C2=A0 =C2=A0 =C2=A0Date: Mon, 15 Nov 2010 05:06:10 GMT > =C2=A0 =C2=A0 =C2=A0 =C2=A0ETag: "2e390v10" > =C2=A0 =C2=A0 =C2=A0 =C2=A0Content-Length: 122477 > =C2=A0 =C2=A0 =C2=A0 =C2=A0Last-Modified: Wed, 13 Oct 2010 23:55:44 GMT > =C2=A0 =C2=A0 =C2=A0 =C2=A0Content-Type: application/pdf > [snipped] > > > Sam > You might be interested in Oleg Kiselyov's HTTPFS paper, which basically put a filesystem frontend on HTTP, so he could give URLs as arguments to programs and have them treated as normal files (translating reads and writes into GET and PUT with caching). I'm not sure how useful pipelining would be in the context of 9P. We have a very tight relationship between each libc function (open, read, write, close) and the 9P messages (Topen, Tread, Twrite, Tclunk), and I just can't see where this pipelining thing would go in. If you want to open and read two files, you call open() twice, get two different fds, and read and write from those. Of course, when you're reading from one file, nothing's happening with the other file; my streams system (the paper and code should be out soon) would help alleviate some of these problems. John