-
Notifications
You must be signed in to change notification settings - Fork 25
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
File system content not always available on Fission gateway #77
Comments
@icidasset I believe that this should fix it: fission-codes/fission#396 I believe that you’ll get a 200 after the data the data fetch is complete — it’s not fire-and-forget internally.Please let me know if you still have problems |
I don't think it's fully working as intended. Here's how I'm testing this:
Notes: |
This sounds like it’s client side. WebRTC or the WSS connection, maybe? EDIT: Oh, I think I misread. In the same browser. Gotcha 👍 I think we need to do a much more detailed root cause analysis here. If you have that window open in your browser, there should always be a route to the data since it’s live |
Yeah exactly, that's what I don't understand. |
Just double checked the server code — we wait for a response from the gateway, so you shouldn’t see a response from us until it’s working. I’m going to double check that we don’t like... ignore errors or something deeper in the code, but on the surface it looks pretty much okay. |
Yeah, we pass back any errors from the gateway |
We need to test browser-to-browser content fetching. Validate that it works without the server in between. Maybe add some text locally, and see if you can fetch it on another tab via our SDK from the console. If that works, so the same with a different browser, then a different machine. Really validate our core assumptions |
Ok, a lot of things to look at here. Discovery
There is no browser-to-browser content fetching at the moment, I think? How would the two nodes know about each other without the server in between? I guess ideally IPFS would automatically discover nodes in the local network, but I guess that's not the case yet for js-ipfs? go-ipfs does have a LAN DHT, pretty sure, but I don't know about js-ipfs. If they did know about each other, the node address would show up in From https://github.com/ipfs/js-ipfs/tree/master/examples/circuit-relaying:
I guess this kind of answers my question. There's also this auto relay thing that's on the todo list for libp2p libp2p/js-libp2p#699 not sure if that's important or not. EDIT: Added signaling server to the swarm, which seems to help a lot. Now we wait for libp2p to remove the need for signaling servers 🙏 Gateway 504I need to observe the response from the update-data-root call more. The API is definitely connected, because the gateway address is listed in Problem seems to be consistent, with the same CID and different CIDs (in other words, with or without file-system changes). The problem does occasionally go away when refreshing the page. DNS CacheFound out that the browser was caching the DNS lookups 😓 EDIT: I think this is fixed, hard to tell with service workers. |
Ok, I think I pretty much solved the discovery issue by adding our signaling server to the swarm list in the config 🎉 Will add this to the default config. |
When setting the data root, we'll want to wait on the API to tell us the content was successfully fetched from our local js-ipfs node. In other words, the data from our file system lives on our local js-ipfs node and we need to wait until that is transferred to the Fission gateway.
More notes:
The text was updated successfully, but these errors were encountered: