DragonFly kernel List (threaded) for 2007-09
[
Date Prev][
Date Next]
[
Thread Prev][
Thread Next]
[
Date Index][
Thread Index]
Re: [Fwd: pkgsrc DragonFly 1.10.1/i386 2007-09-12 00:59]
Justin C. Sherrill wrote:
> FTP hosts could be used too, as only the original request has to be HTTP;
> the redirect just has to be in the form of a URL, and
> fetch/wget/firefox/whatever will all understand it.
Only that pkg_add doesn't cope with that I believe.
> Of course, now I've come up with the idea, so I suppose I have to put up
> or shut up.
Okay, how about some rough design:
URL format:
http://host/DragonFly/1.10/packages/2007Q2 or
http://host/DragonFly/snapshots
------------^-----------------^
take the local part, have configs like this:
cgi-data/DragonFly/snapshots.hosts
of course, prevent any char ~! /[[:alnum:]_\/-]/ in the url to sanitize
the parameter.
The hosts file would then just contain
# hosts for pkgsrc 2007Q2
# hostname prio
http://chlamydia....../2007Q2/DragonFly-1.10/All/ 20
of course the prio field etc could be ignored now/added later.
The CGI just reads in the specified file and outputs a random host from
the list. Later there could be a hostname lookaside data file which
contains data like priority, response time, etc. all the stuff we don't
need anyways.
I guess that's under 50 lines of ruby code.
Mind you that this is to support < 10 hits per hour. Maybe 200 per hour
when we are flashed on a release.
cheers
simon
[
Date Prev][
Date Next]
[
Thread Prev][
Thread Next]
[
Date Index][
Thread Index]