HackerTube
HomeLongsLikedHistoryWatch laterCategoriesPlaylistsSettings

Cory Benfield - Building Protocol Libraries The Right Way - PyCon 2016

PyCon 20162 HN recommenders · recommended in 2 months, 2016-2024
YouTube
15K views · 10 years ago · talk · evergreen

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.

HN points to it as the foundational argument for sans-I/O protocol library design.

Networking & internet infrastructurePython, Ruby & scripting languagesSoftware architecture & design#python#http2#separationofconcerns#networkprotocols#librarydesign

3 comments from Hacker News

@dloss2024 · in “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

CitesView on HN
@mindcrash2017 · in “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.

RecommendsView on HN
@geofft2016 · in “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 part of the event-processing code thinks it knows how to do network I/O, you have many more opportunities for getting network I/O wrong. If xterm were designed so that e.g. xevents() had only the responsibility of fetching bytes from the X socket and do_xevents() and everything else had only the responsibility of handling bytes from an buffer, there would be no temptation to poll in two different functions. Only one function would even know that the byte source is a socket; the rest just know about the buffer.

RecommendsView on HN
Raymond Hettinger, Keynote on Concurrency, PyBay 20171:13:53

Raymond Hettinger, Keynote on Concurrency, PyBay 2017

SF Python
161K views • 9 years ago
The Clean Architecture in Python49:54

The Clean Architecture in Python

Next Day Video
114K views • 12 years ago
Q&A with Guido van Rossum, Inventor of Python56:55

Q&A with Guido van Rossum, Inventor of Python

Microsoft Reactor
28K views • 5 years ago
Building Your Own Dynamic Language1:14:32

Building Your Own Dynamic Language

Stanford
21K views • 18 years ago
Nathaniel J. Smith - Trio: Async concurrency for mere mortals - PyCon 201832:17

Nathaniel J. Smith - Trio: Async concurrency for mere mortals - PyCon 2018

PyCon 2018
30K views • 8 years ago
Scalability at YouTube38:43

Scalability at YouTube

Next Day Video
51K views • 14 years ago
Build Your Own Async2:12:42

Build Your Own Async

David Beazley
60K views • 7 years ago
Ruby Conf 12 - Boundaries by Gary Bernhardt45:55

Ruby Conf 12 - Boundaries by Gary Bernhardt

Confreaks
58K views • 13 years ago
Stop Writing Classes27:29

Stop Writing Classes

Next Day Video
962K views • 14 years ago
Google I/O 2012 - Go Concurrency Patterns51:27

Google I/O 2012 - Go Concurrency Patterns

Google for Developers
894K views • 14 years ago
Joe Armstrong & Jeremy Ruston - Intertwingling the Tiddlywiki with Erlang | Code Mesh LDN 1844:38

Joe Armstrong & Jeremy Ruston - Intertwingling the Tiddlywiki with Erlang | Code Mesh LDN 18

Code Sync
11K views • 7 years ago
Armin Ronacher - A Python for Future Generations42:44

Armin Ronacher - A Python for Future Generations

EuroPython Conference
6K views • 9 years ago
Modern Dictionaries by Raymond Hettinger1:07:41

Modern Dictionaries by Raymond Hettinger

SF Python
150K views • 9 years ago
Co-dfns Live Stream: Compiler Design and Architecture2:03:12

Co-dfns Live Stream: Compiler Design and Architecture

Aaron Hsu (arcfide)
21K views • 9 years ago
Keynote: Begin...End?57:05

Keynote: Begin...End?

David Beazley
9K views • 5 years ago
"Unison: a new distributed programming language" by Paul Chiusano41:06

"Unison: a new distributed programming language" by Paul Chiusano

Strange Loop Conference
45K views • 7 years ago
Rich Hickey rants about HttpServletRequest in 1080p: Death By Specificity from Clojure Made Simple4:57

Rich Hickey rants about HttpServletRequest in 1080p: Death By Specificity from Clojure Made Simple

Fred Overflow
43K views • 6 years ago
Understanding the Python GIL46:10

Understanding the Python GIL

David Beazley
127K views • 14 years ago
DjangoCon 2008 Keynote: Cal Henderson1:02:44

DjangoCon 2008 Keynote: Cal Henderson

Google for Developers
125K views • 18 years ago
MountainWest RubyConf 2014 - But Really, You Should Learn Smalltalk28:06

MountainWest RubyConf 2014 - But Really, You Should Learn Smalltalk

Confreaks
27K views • 12 years ago