-
Notifications
You must be signed in to change notification settings - Fork 34
Conversation
56b936c
to
4cd8b9e
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Mint
cid: String::from(k), | ||
sender: tx, | ||
})?; | ||
let data = rx.await??; |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
block info will do.
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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 😅
There was a problem hiding this comment.
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. 🙏
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
see #122