[plt-scheme] local planet mirror/repository?

From: Jacob Matthews (jacobm at cs.uchicago.edu)
Date: Fri Dec 5 01:28:47 EST 2008

On Tue, Dec 2, 2008 at 10:51 PM, YC <yinso.chen at gmail.com> wrote:
> On Tue, Dec 2, 2008 at 10:03 PM, Robby Findler <robby at cs.uchicago.edu>
> wrote:
>>
>> If it isn't in the docs, then I don't think it is in the client
>> implementation. But I'd have to go look at it myself to answer those
>> questions and I suspect you'd be just as good as I would for that.
>
> Thanks for the pointer - based on
> http://docs.plt-scheme.org/planet/Utility_Libraries.html, it seems that
> planet can use either HTTP or a "custom" planet protocol. Also it seems that
> planet does read from a config.ss file, which can potentially facilitate
> reading from a local mirror site.  The config.ss in my installation shows
> that by default plt uses the http protocol.

Yes. Just use the HTTP protocol. The custom protocol is best forgotten
about. (I wrote it because I didn't yet understand how problematic it
is for some users on some networks when you write a service that
doesn't use a standard protocol.)

> The doc doesn't discuss how to setup a local mirror of
> planet.plt-scheme.org.  Based on running planet url <author> <pkg> ..., it
> does seem that a servlet called planet-servlet.ss is required to access the
> packages correctly.  Hence I would imagine that setting up a local mirror
> including having the planet-servlet.ss available.

The planet server running at planet.plt-scheme.org does two important things:

1. Serve planet packages
2. Handle uploads, management, display, etc

Most of the code in the planet server is dedicated to the second task.
If you only wanted to worry about the first task (as presumably is
what you'd want to do with a local mirror), you could use the code in
collects/planet/private/planet-shared.ss, probably starting with
lookup-package. [planet-shared.ss is so named because originally it
was the shared library for both client and server to look up the
appropriate package to handle a particular request. The server doesn't
do it that way anymore, but the name remained.]

The other part of the task would be downloading the complete index of
planet packages regularly. That I can't help you with.

-jacob


Posted on the users mailing list.