You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The reason will be displayed to describe this comment to others. Learn more.
Thanks for your notes @offbyone and @alexwlchan, they're greatly appreciated! Do the two of you feel like this kind of document is useful? If so, I may aim to write some others (e.g. writing a HTTP/2 web scraper etc.).
The reason will be displayed to describe this comment to others. Learn more.
Also, do you have any ideas for interesting things you might want to see built?
As another idea I had, it seems like there's interesting room to talk about design patterns using Hyper-h2 as a kind of "useful example". For example, talking about how different asynchronous design patterns work, or "here's how to use threads sensibly", or that sort of thing. Do you think there'd be value in that?
The reason will be displayed to describe this comment to others. Learn more.
For my part? Hell yes; design patterns for low level APIs are excellent documentation. Especially if you can show more than one way to use it. The thing that makes API usage hard is understanding how it interacts with processes, threads, memory, and re-use, all of which are well demonstrated by design articles.
The reason will be displayed to describe this comment to others. Learn more.
Design pattern documentation would be excellent. Examples from hyper-h2 a plus, and probably much more helpful than just trying to read the code and divine the design principles unaided. +1 to design patterns.
I'd like to find out how to get an HTTP/2 server that I can use with my web browser, because that seems like it would be a Useful Thing. [I'm aware that there are examples with twisted and asyncio, but (a) I haven't read them yet, so I may be asking for something that already exists, and (b) I have never used either of those libraries; having the hyper details pulled out separately might be nice.]
The reason will be displayed to describe this comment to others. Learn more.
So, on the topic of "a server you can use with your browser", that turns out to be A Pain In The Ass™. The security requirements for HTTP/2 are high, which means you need a quite recent OpenSSL. Both the Twisted example and the asyncio example can do it (the Twisted one requires a Twisted patch that I haven't landed yet), but in both cases you need OpenSSL 1.0.2 or newer, which is comparatively rare.
I think it's worth documenting these requirements and what you do once you've satisfied them though.
Got suggestions for design patterns worth seeing? I can think of a few:
coroutines, using asyncio
event-driven, using Twisted
no-shared-memory threading
shared-memory threading (one threading example could use actual threads, the other could use gevent/eventlet)
7c1273f
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.
Thanks for your notes @offbyone and @alexwlchan, they're greatly appreciated! Do the two of you feel like this kind of document is useful? If so, I may aim to write some others (e.g. writing a HTTP/2 web scraper etc.).
7c1273f
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.
Also, do you have any ideas for interesting things you might want to see built?
As another idea I had, it seems like there's interesting room to talk about design patterns using Hyper-h2 as a kind of "useful example". For example, talking about how different asynchronous design patterns work, or "here's how to use threads sensibly", or that sort of thing. Do you think there'd be value in that?
7c1273f
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.
For my part? Hell yes; design patterns for low level APIs are excellent documentation. Especially if you can show more than one way to use it. The thing that makes API usage hard is understanding how it interacts with processes, threads, memory, and re-use, all of which are well demonstrated by design articles.
So, 👍
7c1273f
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.
Design pattern documentation would be excellent. Examples from hyper-h2 a plus, and probably much more helpful than just trying to read the code and divine the design principles unaided. +1 to design patterns.
I'd like to find out how to get an HTTP/2 server that I can use with my web browser, because that seems like it would be a Useful Thing. [I'm aware that there are examples with twisted and asyncio, but (a) I haven't read them yet, so I may be asking for something that already exists, and (b) I have never used either of those libraries; having the hyper details pulled out separately might be nice.]
7c1273f
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.
So, on the topic of "a server you can use with your browser", that turns out to be A Pain In The Ass™. The security requirements for HTTP/2 are high, which means you need a quite recent OpenSSL. Both the Twisted example and the asyncio example can do it (the Twisted one requires a Twisted patch that I haven't landed yet), but in both cases you need OpenSSL 1.0.2 or newer, which is comparatively rare.
I think it's worth documenting these requirements and what you do once you've satisfied them though.
Got suggestions for design patterns worth seeing? I can think of a few:
Suggestions for more would be great.