-
Notifications
You must be signed in to change notification settings - Fork 2
Update types with a clearer API, and fix compile issues #1
base: main
Are you sure you want to change the base?
Conversation
willscott
commented
Jul 6, 2022
- Creates an explicit API for backing the HTTP module
- Remove direct dependency of the ipfs core api and other concrete large dependencies
- modifies directory listing behavior, to expose an interface for getting directory item sizes without requesting the full file data.
tagging @aschmahmann and @lidel to provide a heads up that i'm still slowly making progress on trying to get a functional pulled out version of this module of 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.
Cool! I won't have time to review until after Iceland but some quick thoughts:
- @iand started poking at interface side of things in feat: make corehttp a reusable component ipfs/kubo#9070 – worth comparing notes and goals
- feat(gw): Cache-Control: only-if-cached ipfs/kubo#9082 identified new need:only check for block in local store and wont ask the outside world.
- Used offline API for this:
api.WithOptions(options.Api.Offline(true))
but if we had dedicated API for inspecting local cache (for block or even a DAG) it would be better
- Used offline API for this:
- food for thought: we could speed up dir listings a lot by using
Tsizes
: gateway/dir-index-html: switch dir listing sizes to Tsize ipfs/kubo#9058- Unsure if this simplifies API or complicates it, but for sure reduces cost of generating HTML listings
|
@willscott Finally got to this after IPFS Thing: this and other gateway extraction efforts (rainbow, Ian's PR) were discussed during Kubo standup today (ipfs/kubo#8524 (comment)), below is a longer summary that should be useful for you. Gist: given current prioritization and limited resources, we will refine Gateway interface while code remains in ipfs/kubo repo, benefiting from existing tests, with intent of doing extraction as part of the wider "libipfs" efforts. On API changes from this PR: Sounds like a good direction, but the diff is too big to evaluate without tests. Suggestion: It is ok to submit a more bold API like one proposed here, but for us to review it you need to submit a PR similar to ipfs/kubo#9070 Additional takeaways / rationale:
|