The index: how the catalogue is stored, updated, and fetched #27
Replies: 4 comments 1 reply
1. One canonical index, or many?One for the stated reason of the indexer being able to guarantee unique Mod Ids. I would assume a centralized index would make it easier on other creators as they only need to go to one place and learn only one system. If we want to be more decentralized, this could be an index with just basic mod metadata, so no per-version metadata, and that's it. Essentially could be where you use for searching and guarantee that your Mod Id is unique. 4. How it stays currentWould these bots be able to detect if a version of a mod needs new dependencies through these sources? My thoughts are that there is a tool for creating a mod and uploading a new version of a mod that can check for missing/incorrect data, and can potentially upload the mod to SpaceDock per SpaceDock's API (if they don't use GitHub for releases). This tool could potentially be added to Borea as an additional package that the user must explicitly install as it would not be included in the base release. To make it easier to find, there can be a notice/way to download the package while using Borea if you try to create/update a mod. As for tracking who owns a mod, link it to the GitHub account (either listed in the metadata or through commit history) so Borea doesn't need to handle account verification, just a "Link GitHub" and maybe "Link SpaceDock" or something. This format takes more effort on the creator, but I think it can be streamlined enough to make it worth it for consistent and correct data in the indexer. 5. Id uniqueness policyWe can use the indexer as the source of truth. Additionally, the KSA Forums as a potential helper in disputing claims. This would be if in #15 the KSA Forums Post metadata property is accepted as required as it means all mods must have their creation announced on the forums. In the case someone uploads to the forums but not the indexer, this can be used to solve Mod Id disputes where the Forum Post that came first gets the Mod Id. |
|
Three points from Discord so they do not get lost. 6. Dependencies that are not listed@averageksp raised this: in CKAN, a mod cannot be indexed while one of its dependencies is unlisted, which guarantees resolvable installs but also creates the review queue he deals with daily. I would not copy the hard block. 7. The review and moderation modelAlso from @averageksp since he has experience working for CKAN. https://discord.com/channels/1439383096813158702/1532471092252381244/1533944347597213787
The moderation duty that comes with even a metadata-only index would be that we need a documented takedown path and the ability to delist an entry instantly. |
|
Closing out my own open points so this can become the index RFC. 2. Storage layout: two repositoriesI have come around to two repositories, and I would fix that now.
The reasons, mostly said in the opening post but now with a decision attached:
The cost is that a listing's data lives in two places joined by id. 3. The fetch contractClients get one stable URL serving a single snapshot artifact, and never read the repos directly.
I propose the single artifact because offline-first clients cheap: download once, resolve everything locally, consistent with RFC 0017 and RFC 0031 keeping compatibility evaluable offline. Whether the artifact is a tarball of files or one merged JSON document is an implementation detail the RFC can leave to the tooling, as long as the address and the caching behavior are pinned. On the decentralization questionPicking up @KlaasWhite's question and @averageksp's follow-up, here is the line I would draw: central in authority, decentralized in survivability. Central in authority, because the id namespace needs exactly one arbiter (point 5), and dependency resolution needs one catalogue that is allowed to say what exists. Decentralized in survivability, because everything above is plain git plus static files on free infrastructure:
If nobody objects to these three, I would write the index RFC on this basis: two repos, snapshot fetch contract, watcher plus self-service listing plus the moderation model from point 7. |
8. What a GitHub Actions incident does to this designWe got a live test of this yesterday: GitHub had an Actions incident, and it hit PR #31 . I believe that this is important for our design: The scheduled watcher is resilient by shape. The event-driven half needs a sweep. The watcher must be idempotent. |
Uh oh!
There was an error while loading. Please reload this page.
The scope RFC (#25) sets the constraints of how the catalogue is stored, updated, and fetched:
an index format of our own definition, free infrastructure only, and no hosting of content files.
Prompted by @KlaasWhite's question on Discord: "My biggest question at the moment is if its still the plan to do some form of desentrelized index or have it central in some way" .
This discussion settles the shape of the index within the constraints of the scope RFC before it becomes an RFC.
Please reference the numbers so the thread stays followable.
1. One canonical index, or many?
My position: one canonical community index, with clients free to consume additional sources.
The argument for one canonical catalogue:
mod identity is the folder name, the game overwrites anything a file declares (
Mod.MakeUsing, see research/ksa-mod-loading.md), so the id namespace is global and needs an arbiter for uniqueness.It is also what makes dependency resolution possible without downloading archives first: SpaceDock cannot answer "what does this mod depend on" without fetching the archive and reading
mod.tomlsince SpaceDock itself just does not carry that metadata.The argument against going fully decentralized: without a shared catalogue there is no uniqueness arbiter, no offline resolution, and discovery becomes crawling.
Multi-source stays a client capability either way (Borea already tags every entry with its source), so this is about which index is authoritative.
2. Storage layout
The reference is the authored/generated split (see research/prior-art-ckan.md): one small authored template per mod, one generated file per release, produced by tooling.
Open: one repository or two?
Branch protection is per branch, not per folder, so "humans need review on authored files" and "the bot pushes generated files unattended" do not mix well in one repo, and bot commits bury the authored history.
3. The fetch contract
Clients need a stable URL that survives storage reorganization.
Open: full-index download (the CKAN tarball model), per-file fetch, or both.
Published metadata must stay evaluable offline, consistent with RFC 0017's self-contained compatibility data.
4. How it stays current
A watcher bot picks up new releases from GitHub and SpaceDock and commits the generated files.
Manual pull requests remain the fallback and the path for mods hosted anywhere the bot does not watch.
5. Id uniqueness policy
If the index arbitrates ids: first come, first served, uniqueness case-insensitive (Windows folders are case-insensitive, Linux folders are not), casing preserved for display.
The full id rules belong to the metadata format RFC (#15); here the question is only that the index enforces them at publish time.
Push back on any of these, and add what I have missed.
All reactions