Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

adr: 007 - Jan Plugin Catalog #408

Merged
merged 1 commit into from
Oct 20, 2023
Merged

Conversation

louis-menlo
Copy link
Contributor

ADR 007: jan-plugin-catalog

Changelog

  • 2023-10-19: Initial draft

Authors

  • Louis

Status

Proposed

Context

Users should be able to explore plugins, and developers need a channel to publish their plugins

Lesson learned from the Model Catalog: we hosted everything on Github and attempted to retrieve it anonymously, which cost us a lot of effort and led to a limit rate issue. Let's say there are N items in the catalog, and we attempted to send N+1 requests at a time. It was costly and led to an API limit rate issue.

Decision

  1. Combine all JSON items in the catalog into one JSON catalog. Now we just need to work with one catalog file, which means only one request, but the rate limit issue still exists.
  2. CDN - there are cool services out there which support OSS projects, such as JSDELIVR.
  3. Downloading a JSON file is not a good approach, though. Exporting a module works better. Webpack + DefinePlugin should work.
  4. Since we have created a new module, we want to publish it as well. Let's publish it on npm so everyone can install and use it. This is also to add a versioning feature.
  5. Installing this npm module would require the user to update their app to the latest version. Instead, let's import the remote module via CDN, which requires just a few lines of code.
jan-plugin-catalog

Consequences

Alternatives

Reference

Copy link
Collaborator

@hiento09 hiento09 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💯

Base automatically changed from adr/006-jan-core-module to main October 20, 2023 04:22
@louis-menlo louis-menlo force-pushed the adr/007-jan-plugin-catalog branch from e38afb8 to e448016 Compare October 20, 2023 04:22
@louis-menlo louis-menlo merged commit 7c36e7e into main Oct 20, 2023
@louis-menlo louis-menlo deleted the adr/007-jan-plugin-catalog branch October 20, 2023 04:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

2 participants