Spec writable protocol handlers

未关闭
#335 11 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

还没有人认领这个 Issue。

评估

难度
5/5
预计耗时
一周以上
新手友好度
25/100
Issue 类型
功能
描述清晰度
需要澄清
活跃度
停滞

调研方向

首先阅读 Kubo 在 core/corehttp/gateway_handler.go 中的可写网关实现以及 Agregore daemon spec.md。将文档中带有 Location 标头的 201 响应与提议的带有正文的 200 响应进行比较,然后查看 specs PR 293 中有关 IPLD 协议处理程序的相关讨论。完成的标准是为可写的 IPFS 协议处理程序制定一份经过同意并记录在案的标准。

由索引模型根据 Issue 内容生成。

描述

need/analysis P2

As per @lidel's request here's an issue to track the discussion we're having on standardizing writability in IPFS protocol handlers.

The tl;dr, we've got ipfs:// and ipns:// protocol handlers in browsers like Agregore/Brave/Capyloon and most of them focus on what it means to GET some data from the protocol.

In Agregore's case, we've also had the ability to PUT or POST data to IPFS.

Initially this was done via the POST verb which would take some data, upload it to IPFS, then return the uploaded IPFS URL in the response body with a 200 status code.

Earlier this year, during the Agregore Mobile devgrant, we forked Kubo's writable gateway in order to get IPFS protocol handlers on Android with a Chromium fork. Part of this effort involved writing a spec based on Kubo's writable APIs.

The main thing that changed was that Kubo was using the 201 status code and placing the resulting CID in the Location header instead of into the response body. Initially I was aprehensive and wanted to use what we already had, but @makeworld-the-better-one convinced me using solid reasoning which I no longer remember that we should switch over.

Most recently, @fabricedesre was talking about wanting to move back to the 200+body approach for showing result URLs. It seems like this might be the apoproach he'd like to take for Capyloon which is now embedding an Iroh node which could lead to local authoring of data.

Personally, I'd like to keep the 201+location method if possible since I have code which relies on that already, but it's not a hard blocker and I'd be willing to update stuff if it means we can get writability into other browsers sooner.

This also relates to discussions we're having for ipld protocol handlers where we need to specify what an IPLD POST/PATCH should yield.

Ideally we will book a time during Labweek 2022 in Lisbon to sit down and talk about this stuff to figure out what approach we align on.

主要语言
HTML
星标
1.2k
派生
250
PR 合并指标
30 天内没有已合并 PR

环境准备

这个项目没有提供开发容器、Dockerfile 或贡献指南,环境需要你自己搭建:先看它的 README,通用步骤见我们的新手贡献指南。

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

ipfs/specs 的其他 Issue

查看 ipfs/specs 的全部 Issue

相似的 Issue

更多 Backend & API Design Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。