Skip to content
This repository has been archived by the owner on Nov 29, 2023. It is now read-only.

feat: gateway worker #195

Merged
merged 8 commits into from
Dec 28, 2022
Merged

feat: gateway worker #195

merged 8 commits into from
Dec 28, 2022

Conversation

scott-dn
Copy link
Contributor

see #122

@scott-dn scott-dn marked this pull request as ready for review December 28, 2022 06:24
Copy link
Contributor

@b0xtch b0xtch left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Mint

@scott-dn scott-dn merged commit d4fb992 into main Dec 28, 2022
@scott-dn scott-dn deleted the feat/gateway-worker branch December 28, 2022 08:16
@scott-dn scott-dn linked an issue Dec 28, 2022 that may be closed by this pull request
cid: String::from(k),
sender: tx,
})?;
let data = rx.await??;
Copy link
Collaborator

@kckeiks kckeiks Dec 28, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@scott-dn I don't think this model [send request to node] -> [read response and cache it] -> [send respond to client] is going to work with stream piping the IO (client <-> node). Do you have some ideas?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, with cache, we don't have to deal with stream data at the moment (we might want to stream from cache).
But for the case of files larger than 1GB, we don't want to cache them; we should stream all the way instead.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How would we know the size before requesting content from the cache nodes or are you thinking that we will use content-lenght?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

block info will do.

#158 (comment)

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@theBeardA so what does the "block info" rpc method return?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

isn't it another round trip to the indexer?

I don't think so. Aren't we currently calling the global indexer, given a cid? That returns the metadata. So instead of adding another rpc method or calling ursa_get_cid to get the file size, we could add the file size in the metadata. Thoughts?

sounds good to me.

Copy link
Collaborator

@kckeiks kckeiks Dec 29, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That would be a lot easier then messing around with HTTP headers to make proxying decisions 😅

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Agree 💯 we should have an issue ticket for this. 🙏

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Here #206

Left some questions, notes, links from research.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

feat: gateway index workers
4 participants