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

rewrite manifest module registry #11

Closed
Tracked by #10
tabcat opened this issue Sep 14, 2022 · 3 comments
Closed
Tracked by #10

rewrite manifest module registry #11

tabcat opened this issue Sep 14, 2022 · 3 comments

Comments

@tabcat
Copy link
Member

tabcat commented Sep 14, 2022

The registry contains components. The components are referenced by a key in a database manifest. If the components referenced by the manifest are registered, the database can be opened and SEC is ensured.

The plan is to use something like protocol ids for registration and resolution so that components can be upgraded since versioning is included. Also the prefix will make sure that components of different categories are not mixed up, e.g. a store component is not registered as an access component.

@tabcat tabcat mentioned this issue Sep 14, 2022
6 tasks
@tabcat
Copy link
Member Author

tabcat commented Sep 14, 2022

from looking at https://github.com/libp2p/js-libp2p/blob/master/src/ping/index.ts and https://github.com/libp2p/js-libp2p/blob/master/src/identify/index.ts it looks like the structure of a protocol id is /<protocol prefix>/<protocol name>/<protocol version>. will use this same structure for manifest components and possibly other places like the manifest itself in a version field.

@tabcat
Copy link
Member Author

tabcat commented Sep 14, 2022

since my plan is to have the protocol prefix include the type of component, e.g. one of store, access, entry, identity, it might not be necessary to have a unique registry for each type. will see what route looks best.

@tabcat tabcat changed the title build interfaces for manifest modules rewrite manifest module registry Sep 14, 2022
@tabcat
Copy link
Member Author

tabcat commented Sep 25, 2022

Going to be keeping a register for each component after all so typescript can say whether one fits that register or not.

@tabcat tabcat closed this as completed in fac797a Sep 25, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant