Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 15 Mar 2001 10:38:21 -0000
From:      "Duncan Barclay" <dmlb@dmlb.org>
To:        "Peter Pentchev" <roam@orbitel.bg>, "Kris Kennaway" <kris@obsecurity.org>
Cc:        <hackers@FreeBSD.org>, <fs@FreeBSD.org>
Subject:   Re: httpfs
Message-ID:  <000d01c0ad3c$0ed83fb0$d26020c2@Cadence.COM>
References:  <20010310031515.A8998@mollari.cthul.hu> <20010315095533.C12432@ringworld.oblivion.bg>

next in thread | previous in thread | raw e-mail | index | archive | help
Hi

A thing to keep in mind about the portal file system is that it
designed to provide a means of getting a file handle to an object that
could be obtained by a call to open(2). It does not then provide
a means of reading/writing etc. to that object.

If you take a look at the example portal.conf then you can see how
this can be used to open a socket via a pathname. Operations on the
socket are then make using write(2) etc.

I don't really think that portalfs is the right thing to use to build
an httpfs with, but I would like to see how you managed to get your example
to work. Are you using stdout to create an anonymous file handle? What happens
if two processes concurrently read from /p/http/*?

Duncan

--
_____________________________________________________________
Duncan Barclay  | God smiles upon the little children,
dmlb@dmlb.org   | the alcoholics, and the permanently stoned.
dmlb@freebsd.org| Steven King


> On Sat, Mar 10, 2001 at 03:15:15AM -0800, Kris Kennaway wrote:
> > A few of us were talking on IRC tonight about how cool it would be to
> > have an httpfs filesystem -- then it occurred to me we almost have
> > this already, in the form of the (under-utilised) portalfs.  Portalfs
> > works by handing off everything to a userland daemon which handles the
> > actual transaction request, so you could easily imagine extending it
> > to provide an http method similar to the tcp method it currently has
> > for initiating tcp connections.
> >
> > One could probably make this more generic and finish implementing the
> > undocumented 'exec' method (which currently exists as a stub): this
> > would run an administrator-specified command (i.e. fixed in
> > /etc/portal.conf) and pipe the output back to the user.
> >
> > A fully navigable httpfs (e.g. one you can ls and cd around in) is
> > more work and probably requires a full stacking layer, but this would
> > still be pretty cool.
> >
> > Is anyone feeling inspired to implement this? :-)
>
> OK, as I've mentioned in a private mail to Kris several hours after he
> sent out this message, I've done some initial hacking on mount_portal
> which lets me put:
>
>   http/ exec http/ /usr/bin/fetch fetch -q -o - http://$1-
>
> into /etc/portal.conf, and then do cat /p/http/www.FreeBSD.org/handbook/
> (the $1- part refers to path components below /p/http/; $1- means
> 'path components from 1 to last, separated by /')
>
> The code still needs a lot of cleanup before I would dare submit it for
> review and comments; my question is, should I bother^W^W^Wdoes this look
> like a reasonable extension to mount_portal, or are there other ways/places
> that such functionality should be implemented, if at all?
>
> G'luck,
> Peter
>
> --
> If the meanings of 'true' and 'false' were switched, then this sentence
wouldn't be false.
>
> To Unsubscribe: send mail to majordomo@FreeBSD.org
> with "unsubscribe freebsd-fs" in the body of the message
>
>


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-fs" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?000d01c0ad3c$0ed83fb0$d26020c2>