Skip to content

Use CDN + jsDelivr to avoid cloning the main repo #8268

Description

@igor-makarov

Hi all,

For the past couple of months, I've been researching ways to make pod install not rely on git as its main spec registry.

I have developed an experimental plugin that does this. It translates pod names to jsDelivr URLs and downloads the files locally. This way, only the pods necessary are fetched and not the entire spec repo.

There is a small caveat, though: jsDelivr CDN and GitHub's CDN do not have directory listings. On the other hand, GitHub's API is severely rate-limited. To solve this, I have created a fork of the spec repo that generates an index file for each pod directory. I'm auto-updating this repo using a Jenkins job.

I have gotten good performance out of this, both in development and on CI. There's no clone and no pull anymore. I think this can be made available on main, without the use of plugins or repo clones.

Suggested course of action:

  1. Go over the main spec repo and generate per-pod directory index files.
  2. Update trunk server to generate index files on every new commit.
  3. Modify Pod::Source to support this CDN-based way and activate the main spec repo to support this by default.

I've been in contact with jsDelivr and they are ok with this. In addition, GitHub has their own CDN, which is not rate-limited. The one jsDelivr have is more performant, though.

Let me know whether you like my idea. I'm more than willing to put in work and make pod install less painful for everyone.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    t3:discussionThese are issues that can be non-issues, and encompass best practices, or plans for the future.

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions