-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
Define the VISION #2772
Define the VISION #2772
Conversation
docs/VISION.md
Outdated
|
||
### Layers | ||
|
||
In all cases, a user brings their own runtime and IO to work with hyper. The IO is provided to hyper, and hyper acts on top of it. hyper returns `Future`s that the user then decides how to poll, likely involving their runtime options. |
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.
Could you add something here, and possibly in the tenets, about the degree to which hyper provides optional runtime integration? For instance, hyper currently has an optional runtime
feature; what criteria would hyper use to evaluate proposals for additional such features? (e.g. maintainability, not compromising higher-priority tenets) Similarly, what criteria would be used to evaluate (optional) integration with various different versions of traits such as AsyncRead
/AsyncWrite
?
These seem like questions people will reasonably ask, for which it'd be helpful to have a reference in the tenets and vision.
I don't seem to be able to comment on the lines for some reason, so quoting here:
Is this the sort of thing that might be able to be overridden? I've had experiences where I've had to interact with HTTP servers that would send incorrect content-length headers before (I believe if you just accepted all bytes until they closed the connection it would work). |
I suppose it's possible, but that's a really really big bug. Message length discrepancies are the basis of message smuggling vulnerabilities. But to the point of this document, hyper is Correct first, but if something is really needed, Flexible allows us to provide options to turn some things off. |
|
||
## Security | ||
|
||
The security of hyper is a large part of what makes hyper _protective_. We make |
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.
Other than in the charter, this is the only other usage of the word protective
. Would be good to expound on it a bit. This line begs the question: "what other parts of hyper also make it protective?". I think that might already be answered in the doc but it would be good to make the association between the term protective
and some of the other points on this doc more explicit. And maybe also explicitly define what we mean by protective
somewhere in the doc?
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.
❤️
Motivated by the **Flexible** tenet, there _are_ version-specific options that | ||
can be configured at this level, and version-specific functionality can usually | ||
be handled via `http::Extensions`. |
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.
Is it worth discussing what the vision is for cases that fall outside of what can be handled with Extensions
? To use the example we discussed in Discord recently, suppose we want to handle custom h2 frames that arrive interleaved with the data frames, which therefore can arrive after the head is received and Extensions
can no longer be modified.
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.
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.
Yea, it's definitely worth discussing, at least at a high level. We want this to define mechanisms that we used to then outline issues and roadmaps for changing the exact code to get here.
I notice this sentence says "usually", which does already allow some wiggling that not all things can be handled by Extensions
. Alternative mechanisms that seem definitely possible could be included in a sentence too.
Exciting stuff! Thanks sean |
Being _fast_ means we improve throughput, drive down CPU usage, and improve | ||
sustainability. | ||
|
||
Fast _enough_. We don't sacrifice sanity for speed. |
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.
any ideas, considerations regarding io uring support which may come with new IO async interface (owned buffers instead of borrowed ones)?
This is an overview of what the shape of hyper looks like, but also somewhat zoomed out, so that the vision can survive while the exact minute details might shift and change over time. It starts with what is hyper, defines a framework for how we make decisions, includes use cases we've considered, and then shows how the library can ideally fulfill its purpose.
There's two documents here. The VISION is the main document, and includes a list of prioritized tenets inside it. The TENETS document is supplemental, and goes more in-depth on what the principles mean, and examples of how they've been used before.
This is the first step in the hyper 1.0 timeline.
This blog post includes background and motivation for defining a VISION for hyper.
Feedback very much welcome!
The VISION has been merged.