-
Notifications
You must be signed in to change notification settings - Fork 106
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
docs: add manifesto #15
Conversation
Some high-level thoughts behind the design rationale.
|
||
For example: | ||
|
||
- Applications deployed to browsers may wish to limit the size of the final bundle by omitting features |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How do applications omit features? Is it manual, automated / tree shaking, or some combination?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Required:
- libp2p
- Somewhere to get/put blocks (blockstore)
bitswap would check blockstore first and look elsewhere if a file isn't there.
Optional feature example: IPNS (needs libp2p and pubsub)
Configure IPNS service to extend Helia export?This would bring us back to where we are now- Change the IPNS service to take the components you use to build a Helia node? (preferred, we think)
Could pass things to Helia that you want to use. If you don't want a feature, just don't add the module.
|
||
It will use [js-libp2p] and [js-bitswap] to ensure compatibility with existing IPFS clients. | ||
|
||
[js-ipfs]: https://github.com/ipfs/js-ipfs |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What will the Helia APIs and other interfaces look like? What will it take to migrate from js-ipfs?
Can migrations be done in minutes, or will they take hours?
We should also mention the fact that Helia is expected to fully replace js-ipfs eventually, and js-ipfs will be deprecated.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- depends on what parts of the API you're using. If it's just add and cat, then it's not a big change.
open question: How will users set their configuration?
note: These are ideas but they might change based on what we learn as Helia is developed.
Currently, there are many ways to set configuration. We want there to be 1 way to do it.
One big change for migrators is that they'll need to use some underlying libraries directly. Example:
- if you want to ping, you'll use libp2p directly. It won't be a method on the root of Helia.
- pubsub methods (currently just chain through to libp2p) won't be in Helia.
- Will need to create migration documentation: from X method before, to Y thing now.
There will be a way to do what you did with js-ipfs, but it may be a little different.
|
||
- Applications deployed to browsers may wish to limit the size of the final bundle by omitting features | ||
- Others run in extremely adversarial environments often wish to limit the number of dependencies in the tree to limit the possibility of supply chain effects | ||
- The user should not have to include the code for features their application does not use |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What will be the best way for users to do this? (exclude code)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Have features implemented as separate modules or services; if you don't use the feature, you don't use its module.
Example: libp2p has a DHT implementation (kad-dht module). If you include it in your bundle, you get the DHT implementation; if you don't include it, you don't get the code for it either
|
||
## Non-goals | ||
|
||
Helia is not attempting to reinvent the wheel when it comes to layers beneath the top-level API. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we briefly explain what these layers are? Anything beyond js-libp2p and js-bitswap?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
includes: ipld, unixfs
We are designing a filesystem API. People complain the current API is too big (many methods; does a lot of things; object API, configuration API, bootstrap API)
Helia is focused on delivering an ergonomic filesystem API - not changing the other components.
Non-goal: Rearchitecting everything.
- FILES.md is the really useful thing; files API
- The other things won't be part of the Helia API
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- don't need an API for config; you should just config your thing
- the other APIs are useful but don't need to be everywhere all the time.
- e.g. IPNS can be its own thing; you would use the IPNS module and pass it libp2p and blockstore. That way, it's not part of the Helia API because it doesn't necessarily have anything to do with the filesystem; it's just mutable pointers to CIDs.
- e.g. IPLD is its own thing; use the codecs directly, but pass it the blockstore so you have a place to put the blocks.
We'll create some documentation to show how to do network IPLD operations.
Bumps [go-ipfs](https://github.com/ipfs/npm-go-ipfs) from 0.18.1 to 0.19.0. - [Release notes](https://github.com/ipfs/npm-go-ipfs/releases) - [Commits](ipfs/npm-kubo@v0.18.1...v0.19.0) --- updated-dependencies: - dependency-name: go-ipfs dependency-type: direct:development update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Adds an `offline` option to publish and resolve that causes this module to only use the local datastore instead of any configured routers.
## [@helia/ipns-v1.1.0](https://github.com/ipfs/helia-ipns/compare/@helia/ipns-v1.0.1...@helia/ipns-v1.1.0) (2023-03-29) ### Features * allow publish/resolve using only local datastore ([#15](ipfs/helia-ipns#15)) ([43e32a2](ipfs/helia-ipns@43e32a2))
Some high-level thoughts behind the design rationale.