-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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
[feature request] support for dat / ipfs #428
Comments
Hey @DanielRuf - I work in the p2p space and collaborated with ipfs folks when they asked for Node.js stuff before. Deno is a server-side tech - if you want to leverage p2p you should already be able to use Deno once it exposes network APIs and communicate with other browsers and swarms. Unless there is a concrete request or changes or features - then I'm not sure if there is anything left for Deno to do for this. Note that p2p isn't a magic pill and requires a lot of work to get to reasonable real-world performance and throughput. |
This is what we have to track and keep in mind and this issue is meant to keep track of current implementations and the support (if this is ok) and collect dis/advantages and solutions for the appropriate use cases.
I'm totally aware of this =) |
I think a good goal is support for custom protocol handlers so we can do |
@jedahan well, it makes more sense to eventually support loaders rather than protocol handlers the way Node and client-side tooling does. |
@jedahan or dat, ipfs, and ssb are all able to launch http servers, so you can load modules into But having direct integration would be cool, but how best to do that? Maybe we could keep this issue open and continue to talk about it. I'm not going to push too hard to implement this straight into |
There is a straightforward hook point (the module loader) that both the ECMAScript language and the V8 engine itself expose and other platforms (Node) expose with a
Definitely, I think Deno is still figuring things out like basic I/O. |
@ry is this issue something we have plans for? |
oof. Not any time soon. I can conceive of it happening some day, years in the future. But IPFS is not very good right now. And Deno is not very good right now. We cannot dedicate time to that at this point. Closing tho I'm open to the idea. Will be open to discussing further in 2020. |
I thought import would work out of the box with ssb, with no need for a custom protocol handler. But it doesn't because Deno needs a proper filename. Example:
fails with the error:
which I think is because the filename is This doesn't have to be reopened until 2020, but I think this is the only reason why you can't use ssb's distributed blob store as a module manager right now. |
Well it's 2020 now, who's keen!? |
Aye |
aaand it's 2021. |
I think now its a great time to start adding ipfs support to deno, that idea of having "custom loaders" at protocol level sounds good. import { XmlToJson } from '/https://raw.githubusercontent.com/hi-diego/json-to-xml/master/src/main.ts' I will like to do something like: import { XmlToJson } from '/ipfs/5d63845ce24efe53aa98d639aa37f18bd2da68ccbebdc83f05527987a1bab841.sha256.ts' And avoid using an http to ipfs gateways: import { XmlToJson } from 'https://ipfs.io/ipfs/5d63845ce24efe53aa98d639aa37f18bd2da68ccbebdc83f05527987a1bab841' Maybe creating support for custom loaders is the way to go instead of providing support for each protocol natively. |
It might be interesting to also have some dat (and / or ipfs) support (share cache with others, download from (privately) shared URLs, leverage p2p in environments with bandwidth / connectivity issues, faster, a bit more decentralization, ...).
Is this already supported, does this make sense and how can we help here?
The text was updated successfully, but these errors were encountered: