-
Notifications
You must be signed in to change notification settings - Fork 17.9k
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
cmd/go: proposal: extend download protocol to allow return of transitive requirements implied by go.mod #29832
Comments
It seems likely that the majority of the round-trip time today is spent fetching Git commits — that is, source code — rather than just Given that — and given that we either can or will parallelize the requests to fetch |
I actually brought up the same point to Paul in private. I imagine that with http2, cmd/go could download many |
Yep. There's still a potential for extra latency due to the round-trips, but the overall latency is proportional to the depth of the minimum spanning tree of the module graph — not the total number of modules. We're obviously still learning what those depths are going to be in practice, but I would be surprised if it's a significant issue, especially if the module proxies have a reasonable geographic distribution. |
I believe Paul's point with this issue is a potential opimisation of the download protocol. Like you, I think the current protocol will be fast enough for nearly all use cases once module proxies are widespread. I think Paul means to consider this optimisation only if the speed at that point is still not enough. |
If the fetches are parallelized then the latency here is dominated by the depth of the dependency chain. |
That describes the situation much more precisely, thanks.
Yes, I have to admit this proposal was based entirely on a hunch rather than evidence. I'll therefore close this for now and we can revisit if/as required. |
Somewhat motivated by the discussion in https://groups.google.com/forum/#!topic/golang-nuts/5otdvVra0xg
The download protocol ("Download Protocol" section of https://research.swtch.com/vgo-module) details the download protocol as follows:
The transitive set of module requirements implied by, say,
example.com
at versionv1.0.0
can I think be derived and then cached by a proxy implementation.Would it therefore make sense to support returning that transitive set of
go.mod
files in a request forGET baseURL/example.com/@v/v1.0.0.mod
, as a stream ofgo.mod
files?Edit: this proposal is an enhancement/optimisation of the existing protocol.
cc @bcmills @mvdan @rogpeppe
The text was updated successfully, but these errors were encountered: