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

docs: add manifesto #15

Merged
merged 2 commits into from
Dec 22, 2022
Merged

docs: add manifesto #15

merged 2 commits into from
Dec 22, 2022

Conversation

achingbrain
Copy link
Member

Some high-level thoughts behind the design rationale.

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
Copy link
Contributor

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?

Copy link
Contributor

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
Copy link
Contributor

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.

Copy link
Contributor

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.

(js-ipfs root API)

  • 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.

MANIFESTO.md Outdated Show resolved Hide resolved

- 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
Copy link
Contributor

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)

Copy link
Contributor

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

MANIFESTO.md Outdated Show resolved Hide resolved
MANIFESTO.md Outdated Show resolved Hide resolved
MANIFESTO.md Outdated Show resolved Hide resolved
MANIFESTO.md Outdated Show resolved Hide resolved
MANIFESTO.md Outdated Show resolved Hide resolved

## Non-goals

Helia is not attempting to reinvent the wheel when it comes to layers beneath the top-level API.
Copy link
Contributor

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?

Copy link
Contributor

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

Copy link
Contributor

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.

@achingbrain achingbrain merged commit 8447b70 into main Dec 22, 2022
@achingbrain achingbrain deleted the docs/add-manifesto branch December 22, 2022 16:07
achingbrain pushed a commit that referenced this pull request Jan 8, 2024
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>
achingbrain added a commit that referenced this pull request Jan 8, 2024
Adds an `offline` option to publish and resolve that causes this
module to only use the local datastore instead of any configured
routers.
achingbrain pushed a commit that referenced this pull request Jan 8, 2024
## [@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))
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

Successfully merging this pull request may close these issues.

2 participants