Skip to content
This repository has been archived by the owner on Feb 12, 2024. It is now read-only.

FlyWeb #599

Closed
runvnc opened this issue Nov 16, 2016 · 18 comments
Closed

FlyWeb #599

runvnc opened this issue Nov 16, 2016 · 18 comments
Assignees
Labels
exploration kind/wontfix-migration-available P2 Medium: Good to have, but can wait until someone steps up status/ready Ready to be worked

Comments

@runvnc
Copy link

runvnc commented Nov 16, 2016

Hello, would something like FlyWeb and js-ipfs make it possible to create a local-ipfs-gateway-in-a-web-page? Or a more general question, does this project or another like it address this issue: it seems that requiring the user to install a local server blocks most potential users and gateways defeat the main purpose by routing all traffic through specific traditional servers. (Or can the core problem of IPFS deployment be solved by socially engineering advocates within key groups like browser and operating systems teams.)

Thanks for giving my question a chance and thanks for your time.

@victorb
Copy link
Member

victorb commented Nov 17, 2016

local-ipfs-gateway-in-a-web-page

Not sure what the use case is here, to run a IPFS gateway in a web page? Not sure why you would like to do that, since you can just fetch the objects directly with js-ipfs in the page, instead of having a gateway.

I don't think I'm understanding your question good enough to give a proper answer.

@runvnc
Copy link
Author

runvnc commented Nov 17, 2016

I thought I described it in enough detail. Either I don't understand IPFS/js-ipfs or I was just wasting my time anyway. Whatever.

@runvnc runvnc closed this as completed Nov 17, 2016
@daviddias
Copy link
Member

Hey @runvnc, what @victorbjelkholm was bringing up is that running an IPFS gateway, also known as the HTTP-API that gets exposed when an IPFS daemon is running, is not possible since you can't have a spawn an http server inside the browser.

What you can do directly, is use js-ipfs as a "gateway" to the entire IPFS network, because js-ipfs is a full IPFS node :)

@runvnc
Copy link
Author

runvnc commented Nov 17, 2016

FlyWeb is an HTTP server in Firefox. If it were used to make a gateway then other IPFS sites that don't know about js-ipfs would be accessible.

@jbenet
Copy link
Member

jbenet commented Nov 18, 2016

@runvnc yeah this use case is a good idea, and i've discussed it with some as Mozilla worked on, and released FlyWeb. Yes, we should be able to make an ipfs http gateway with it, to interact with non-ipfs devices locally. Expanding your questions, i think you're asking:

  • Does the js-ipfs implementation include the http-to-ipfs gateway that go-ipfs has?
  • If so, where can i find an example of its usage?
  • And, have you tried using it with FlyWeb, to expose IPFS content with a local gateway? That's what I'm aiming for.

Assuming that,

  • Does the js-ipfs implementation include the http-to-ipfs gateway that go-ipfs has?

I believe not yet? But i think @diasdavid plans for it to be there eventually. @diasdavid thoughts? There's a listing of "commands implemented in js-ipfs to reach go-ipfs parity" somewhere, thought in the readme of this repo, but i can't find it right now.

The point though is to port this part of go-ipfs: https://github.com/ipfs/go-ipfs/tree/master/core/corehttp which is being extracted to https://github.com/ipfs/go-ipfs-gateway soon. (i think @lgierth is up to that)

If you want to try something mad-sciency, can ask @lgierth and @whyrusleeping if the go-ipfs http-to-ipfs gateway is independent enough to try something like a gopherjs-ed thing on top of js-ipfs. I recently have been very impressed by gopherjs -- even if its payloads happen to include the entire go runtime >.<

  • If so, where can i find an example of its usage?

Not yet there, i think.

  • And, have you tried using it with FlyWeb, to expose IPFS content with a local gateway? That's what I'm aiming for.

Yes, i really want this, and want to support this use case. How serious are you about pursuing this? this is something i'd be willing to throw resources into in the near term. (considering putting a bounty on it)

@jbenet jbenet reopened this Nov 18, 2016
@jbenet
Copy link
Member

jbenet commented Nov 18, 2016

I think this is worth reopening, until we have a plan of action.

@runvnc
Copy link
Author

runvnc commented Nov 18, 2016

@jbenet thanks, was starting to think I was crazy. Unfortunately I don't think I have the time right now because of other obligations. I mainly wanted to mention the idea because I saw FlyWeb and wondered if it could help with distributed computing in some way.

It seems like any dev who is interested in FlyWeb and not too busy would quite possibly be excited about this use case, especially if there was a bounty.

So I know that questions don't actually solve problems but can't help but ask one more. Does anyone know if/when Chrome people will start on something like FlyWeb?

@daviddias
Copy link
Member

I believe not yet? But i think @diasdavid plans for it to be there eventually. @diasdavid thoughts? There's a listing of "commands implemented in js-ipfs to reach go-ipfs parity" somewhere, thought in the readme of this repo, but i can't find it right now.

We do support the HTTP-API, which enables us to tests like benchmarks and sharding from go-ipfs. I believe the list you are looking for is this one: https://github.com/ipfs/js-ipfs/blob/master/ROADMAP.md#project-status

You can even use js-ipfs-api to contact js-ipfs through its http-api implementation :)

@daviddias daviddias added status/deferred Conscious decision to pause or backlog and removed js-ipfs-backlog labels Dec 5, 2016
@daviddias daviddias changed the title FlyWeb/similar gateway Use js-ipfs with FlyWeb to enable a 'in browser gateway' Dec 18, 2016
@harshjv
Copy link
Contributor

harshjv commented Dec 31, 2016

@diasdavid So, is it possible to start HTTP gateway using API for js-ipfs node created through API in node.js?

@daviddias
Copy link
Member

@harshjv absolutely, see my comment in your other issue: #693

@ghost
Copy link

ghost commented Feb 21, 2017

I've brought up FlyWeb again, but for local peer discovery: ipfs/in-web-browsers#45

@daviddias
Copy link
Member

Pinging the FlyWeb team @kannanvijayan, @justindarc and @sicking.

Hi FlyWeb team o/, my apologies for spamming directly your Github notifications inbox. We would like to develop a PoC of js-ipfs in the browser using FlyWeb's service discovery API.

Currently, js-ipfs works in the browser, both Chrome and Firefox and we also have an HTTP API and client libraries that developers are familiar, we could expose a http transport for js-ipfs through FlyWeb or use it to find the node in some other tab.

What's the current state of FlyWeb and its current dev roadmap? When can we expect to see it on a regular release of Firefox?

Thanks in advance!

@daviddias daviddias changed the title Use js-ipfs with FlyWeb to enable a 'in browser gateway' FlyWeb Sep 12, 2017
@daviddias daviddias added status/ready Ready to be worked status/deferred Conscious decision to pause or backlog and removed status/deferred Conscious decision to pause or backlog status/ready Ready to be worked labels Oct 17, 2017
@daviddias
Copy link
Member

@lgierth @victorbjelkholm could you please document in this issue your recent experiments? Thank you :)

@daviddias daviddias added the P2 Medium: Good to have, but can wait until someone steps up label Oct 17, 2017
@victorb
Copy link
Member

victorb commented May 24, 2018

There is now a experimental effort from mozilla to support many of our wanted APIs, mdns is one of them! Issue is here: mozilla/libdweb#7

@daviddias daviddias added status/ready Ready to be worked and removed status/deferred Conscious decision to pause or backlog labels Dec 9, 2018
@daviddias
Copy link
Member

@alanshaw @lidel can you post here all the demos and talks on libdweb so far to this thread?

@lidel
Copy link
Member

lidel commented Dec 9, 2018

libdweb: mDNS Local Discovery and TCP Transport

FlyWeb core is reused by libdweb for TCP Socket API.
Discovery and transport poc using this API was created by @alanshaw in
ipfs/ipfs-companion#553:

Video demo: libdweb MDNS discovery for JS IPFS running in a web extension
https://www.youtube.com/watch?v=FRzyWUXIyeo
screenshot_9

libdweb: Streaming Protocol Handler

Protocol Handler API poc implementation of ipfs:// and ipns:// is in ipfs/ipfs-companion#533 (AFAIK not related to FlyWeb, but mentioning here for completeness)

Video demo: Protocol Handler Demo with libdweb and Firefox Nightly
https://www.youtube.com/watch?v=fS8pLOQdOoM
Lab Day 2018 // Protocol Handler Demo with libdweb and Firefox Nightly

@SgtPooki
Copy link
Member

FYI that helia-service-worker-gateway did "local-ipfs-gateway-in-a-web-page" via a service-worker, and though the code is somewhat rough around the edges, it proves everyone could essentially all run their own in-app gateways without having to rely on centralized gateways.

The more WebTransport gets supported, and the more nodes in the IPFS network update to support WebTransport, the better this will get.

@whizzzkid
Copy link

js-ipfs is being deprecated in favor of Helia. You can #4336 and read the migration guide.

Please feel to reopen with any comments before 2023-06-05. We will do a final pass on reopened issues afterward (see #4336).

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
exploration kind/wontfix-migration-available P2 Medium: Good to have, but can wait until someone steps up status/ready Ready to be worked
Projects
No open projects
Status: Done
Development

No branches or pull requests

8 participants