Right now, for the package agile (chosen arbitrarily), the following URLs are used to access information about the package:
http://pkgs.racket-lang.org/package/agile - S3-backed view-only HTML of agile package info
http://pkgd.racket-lang.org/pkgn/package/agile - Editable HTML of agile package not served by S3
http://pkgo.racket-lang.org/pkg/agile http://pkgs.racket-lang.org/pkg/agile - Raw Racket data of agile package not served by S3 and used by raco pkg tools
Additionally, every so often (not sure 100% on the exact timing) the package server publishes the HTML of pkgd in S3 so it is served by pkgs. This is a push based model — S3 acts as an independent copy of the catalog that the Racket server is responsible for updating as needed. I think it would be simpler and easier for all systems involved if the catalog used a pull based model with AWS CloudFront, content negotiation, and appropriate use of caching headers.
In this proposed setup, there would be one URL per package that served both HTML and s-exp data using the Accept and Content-Type headers, and CloudFront would act as a reverse proxy serving cached copies of package data based on the origin server's Cache-Control headers. This would remove the need for three different URLs for the same server, as CloudFront could serve cached GET requests while forwarding POST, PUT, and DELETE requests. CloudFront can serve GETs even if the origin server is down, so we'd still be able to offer a read-only view of the catalog during an outage.
This would also allow tools other than browser to cache package data and interact with the HTML view of packages. A raco pkg user could open an installed package's catalog entry without needing to know anything other than the URL the package was installed from. Scribble could do the same (this came up in discussion of racket/racket#1797) to link package mentions in docs to their catalog entries. Additionally, raco pkg would be able to reuse the same caching headers exposed to AWS to locally cache package data.
Right now, for the package
agile(chosen arbitrarily), the following URLs are used to access information about the package:http://pkgs.racket-lang.org/package/agile- S3-backed view-only HTML ofagilepackage infohttp://pkgd.racket-lang.org/pkgn/package/agile- Editable HTML ofagilepackage not served by S3http://pkgo.racket-lang.org/pkg/agilehttp://pkgs.racket-lang.org/pkg/agile- Raw Racket data ofagilepackage not served by S3 and used byraco pkgtoolsAdditionally, every so often (not sure 100% on the exact timing) the package server publishes the HTML of
pkgdin S3 so it is served bypkgs. This is a push based model — S3 acts as an independent copy of the catalog that the Racket server is responsible for updating as needed. I think it would be simpler and easier for all systems involved if the catalog used a pull based model with AWS CloudFront, content negotiation, and appropriate use of caching headers.In this proposed setup, there would be one URL per package that served both HTML and s-exp data using the
AcceptandContent-Typeheaders, and CloudFront would act as a reverse proxy serving cached copies of package data based on the origin server'sCache-Controlheaders. This would remove the need for three different URLs for the same server, as CloudFront could serve cached GET requests while forwarding POST, PUT, and DELETE requests. CloudFront can serve GETs even if the origin server is down, so we'd still be able to offer a read-only view of the catalog during an outage.This would also allow tools other than browser to cache package data and interact with the HTML view of packages. A
raco pkguser could open an installed package's catalog entry without needing to know anything other than the URL the package was installed from. Scribble could do the same (this came up in discussion of racket/racket#1797) to link package mentions in docs to their catalog entries. Additionally,raco pkgwould be able to reuse the same caching headers exposed to AWS to locally cache package data.