Cory Benfield - Building Protocol Libraries The Right Way - PyCon 2016
Why Hacker News recommends it
HN points to it as the foundational argument for sans-I/O protocol library design.
What it is
Cory Benfield's PyCon 2016 talk on building protocol libraries that can be reused widely, using the Python Hyper HTTP project as the example. He argues for separating protocol parsing from I/O.
Recommended by 2 HN commenters across 2 different months, 2016 to 2024.
What Hacker News said
Recommends geofft · 2016-06 · on “Accidentally nonblocking”
Cory Benfield's PyCon talk last week, "Building Protocol Libraries the Right Way" ( [this video] ), makes the argument that a large number of problems can be traced to not cleanly separating responsibilities of actually physically doing I/O and making semantic sense of the bytes. His primary worry was about reimplementing things like HTTP many times, once for each I/O framework (why do Twisted, Tornado, and asyncio all have their own HTTP implementation?). But it seems the same problem can be seen here: every single part of the code thinks it knows how to actually retrieve data from the network, so it interacts with the network on its own, causing nested polling and similar awkwardness. If every
Recommends mindcrash · 2017-12 · on “Ask HN: Separate Logic from IO”
In some cases it is very practical, even in other (non functional) programming languages. For example, [LINK] (and its accompanying talk [this video] ) give some really great brainfood about the way currently all kinds of network protocols are implemented, and the benefits of separating the protocol (Logic) from the actual implementation (IO). You might also want to query Google or DDG for "Free monads" if you want to implement a similar layered approach in a functional language such as Scala or Haskell.
Cites dloss · 2024-04 · on “WinBtrfs – an open-source btrfs driver for Windows”
The above sans-io page links to this PyCon 2016 talk: Cory Benfield - Building Protocol Libraries The Right Way [this video]