Date: Mon, 25 Jan 2021 19:00:00 -0500
<div class="wp-block-jetpack-markdown"><h3>Summary</h3> <p>Working with network protocols is a common need for software projects, particularly in the current age of the internet. As a result, there are a multitude of libraries that provide interfaces to the various protocols. The problem is that implementing a network protocol properly and handling all of the edge cases is hard, and most of the available libraries are bound to a particular I/O paradigm which prevents them from being widely reused. To address this shortcoming there has been a movement towards "sans I/O" implementations that provide the business logic for a given protocol while remaining agnostic to whether you are using async I/O, Twisted, threads, etc. In this episode Aymeric Augustin shares his experience of refactoring his popular websockets library to be I/O agnostic, including the challenges involved in how to design the interfaces, the benefits it provides in simplifying the tests, and the work needed to add back support for async I/O and other runtimes. This is a great conversation about what is involved in making an ideal a reality.</p> <h3>Announcements</h3> <ul> <li>Hello and welcome to Podcast.__init__, the podcast about Python and the people who make it great.</li> <li>When you’re ready to launch your next app or want to try a project you hear about on the show, you’ll need somewhere to deploy it, so take a look at our friends over at Linode. With the launch of their managed Kubernetes platform it’s easy to get started with the next generation of deployment and scaling, powered by the battle tested Linode platform, including simple pricing, node balancers, 40Gbit networking, dedicated CPU and GPU instances, and worldwide data centers. Go to <a href="https://www.pythonpodcast.com/linode?utm_source=rss&utm_medium=rss">pythonpodcast.com/linode</a> and get a $100 credit to try out a Kubernetes cluster of your own. And don’t forget to thank them for their continued support of this show!</li> <li>Your host as usual is Tobias Macey and today I’m interviewing Aymeric Augustin about his work on the websockets library and the work involved in making it sans I/O</li> </ul> <h3>Interview</h3> <ul> <li>Introductions</li> <li>How did you get introduced to Python?</li> <li>Can you start by giving an overview of your work on the websockets library and how the project got started?</li> <li>What does "sans I/O" mean and what are the goals associated with it?</li> <li>Can you share the history of your work on the websockets project? <ul> <li>What was your motivation for starting down the path of rearchitecting a project that is already production ready?</li> </ul> </li> <li>Can you talk through how the websockets library is architected currently? <ul> <li>How has the design of the project evolved since you first began working on it?</li> <li>At a high level, what were the changes required to make it functionally sans i/o?</li> </ul> </li> <li>What do you see as the primary challenges associated with making network related libraries sans i/o?</li> <li>In your experience of porting websockets to be purely protocol oriented, what are the technical and design challenges that you faced?</li> <li>One of the goals of the Sans I/O approach is to support reusability and composability of network protocol implementations. What has your experience been as to the viability of those goals in practice?</li> <li>What is your current perspective on the cost/benefit of the sans i/o conversion?</li> <li>Who are the primary consumers of the websockets library? <ul> <li>How do you foresee the target audience changing once you have completed extracting the protocol logic?</li> </ul> </li> <li>What are some of the most interesting, innovative, or unexpected ways that you have seen the websockets project used?</li> <li>What are the most interesting, unexpected, or challenging lessons that you have learned while working on the websockets project and sans i/o conversion?</li> <li>What do you have planned for the future of the project?</li> </ul> <h3>Keep In Touch</h3> <ul> <li><a href="https://www.linkedin.com/in/aaugustin/?originalSubdomain=fr&utm_source=rss&utm_medium=rss" rel="noopener" target="_blank">LinkedIn</a></li> <li><a href="https://twitter.com/aymericaugustin?utm_source=rss&utm_medium=rss" rel="noopener" target="_blank">@aymericaugustin</a> on Twitter</li> <li><a href="https://myks.org/en/?utm_source=rss&utm_medium=rss" rel="noopener" target="_blank">Website</a></li> </ul> <h3>Picks</h3> <ul> <li>Tobias <ul> <li><a href="https://en.wikipedia.org/wiki/Jigsaw_puzzle?utm_source=rss&utm_medium=rss" rel="noopener" target="_blank">Jigsaw Puzzles</a></li> </ul> </li> <li>Aymeric <ul> <li><a href="https://qonto.com/en/blog/inside-qonto/inside-qonto-aymeric-augustin-cto?utm_source=rss&utm_medium=rss" rel="noopener" target="_blank">Inside Qonto interview</a></li> </ul> </li> </ul> <h3>Closing Announcements</h3> <ul> <li>Thank you for listening! Don’t forget to check out our other show, the <a href="https://feeds.fireside.fm/pythonpodcast/rss">Data Engineering Podcast</a> for the latest on modern data management.</li> <li>Visit the <a href="https://www.pythonpodcast.com?utm_source=rss&utm_medium=rss">site</a> to subscribe to the show, sign up for the mailing list, and read the show notes.</li> <li>If you’ve learned something or tried out a project from the show then tell us about it! Email <a href="mailto:hosts@podcastinit.com">hosts@podcastinit.com</a>) with your story.</li> <li>To help other people find the show please leave a review on <a href="https://itunes.apple.com/us/podcast/podcast.-init/id981834425?mt=2&uo=6&at=&ct=&utm_source=rss&utm_medium=rss" rel="noopener" target="_blank">iTunes</a> and tell your friends and co-workers</li> <li>Join the community in the new Zulip chat workspace at <a href="https://www.pythonpodcast.com/chat?utm_source=rss&utm_medium=rss">pythonpodcast.com/chat</a></li> </ul> <h3>Links</h3> <ul> <li><a href="https://fractalideas.com/blog/sans-io-when-rubber-meets-road/?utm_source=rss&utm_medium=rss" rel="noopener" target="_blank">Sans I/O: When The Rubber Meets The Road</a></li> <li><a href="https://github.com/aaugustin/websockets/?utm_source=rss&utm_medium=rss" rel="noopener" target="_blank">Websockets</a> library</li> <li><a href="https://tools.ietf.org/html/rfc6455?utm_source=rss&utm_medium=rss" rel="noopener" target="_blank">Websockets Protocol</a></li> <li><a href="https://qonto.com/?utm_source=rss&utm_medium=rss" rel="noopener" target="_blank">Qonto</a></li> <li><a href="https://groups.google.com/g/python-tulip?utm_source=rss&utm_medium=rss" rel="noopener" target="_blank">Tulip</a></li> <li><a href="https://docs.python.org/3/library/asyncio.html?utm_source=rss&utm_medium=rss" rel="noopener" target="_blank">Asyncio</a></li> <li><a href="https://alice-collaboration.web.cern.ch/?utm_source=rss&utm_medium=rss" rel="noopener" target="_blank">CERN Particle Accelerator</a></li> <li><a href="https://sans-io.readthedocs.io/?utm_source=rss&utm_medium=rss" rel="noopener" target="_blank">Sans I/O</a></li> <li><a href="https://lukasa.co.uk/?utm_source=rss&utm_medium=rss" rel="noopener" target="_blank">Cory Benfield</a></li> <li><a href="https://tools.ietf.org/html/rfc7540?utm_source=rss&utm_medium=rss" rel="noopener" target="_blank">HTTP/2</a></li> <li><a href="https://twistedmatrix.com/?utm_source=rss&utm_medium=rss" rel="noopener" target="_blank">Twisted</a></li> <li><a href="https://github.com/dabeaz/curio?utm_source=rss&utm_medium=rss" rel="noopener" target="_blank">Curio</a></li> <li><a href="https://github.com/python-trio/trio?utm_source=rss&utm_medium=rss" rel="noopener" target="_blank">Trio</a></li> <li><a href="https://en.wikipedia.org/wiki/Inversion_of_control?utm_source=rss&utm_medium=rss" rel="noopener" target="_blank">Inversion of Control</a></li> <li><a href="https://github.com/acatton/ohneio?utm_source=rss&utm_medium=rss" rel="noopener" target="_blank">ohneio</a> helper library for implementing sans I/O network protocols</li> <li><a href="https://en.wikipedia.org/wiki/SOCKS?utm_source=rss&utm_medium=rss" rel="noopener" target="_blank">SOCKS Proxy</a></li> <li><a href="https://github.com/sanic-org/sanic?utm_source=rss&utm_medium=rss" rel="noopener" target="_blank">Sanic</a></li> </ul> <p>The intro and outro music is from Requiem for a Fish <a href="http://freemusicarchive.org/music/The_Freak_Fandango_Orchestra/?utm_source=rss&utm_medium=rss" rel="noopener" target="_blank">The Freak Fandango Orchestra</a> / <a href="http://creativecommons.org/licenses/by-sa/3.0/?utm_source=rss&utm_medium=rss" rel="noopener" target="_blank">CC BY-SA</a></p> </div> <img alt="" height="0" src="https://analytics.boundlessnotions.com/piwik.php?idsite=1&rec=1&url=https%3A%2F%2Fwww.pythonpodcast.com%2Fwebsockets-sans-io-episode-299%2F&action_name=Making+The+Sans+I%2FO+Ideal+A+Reality+For+The+Websockets+Library+-+Episode+299&urlref=https%3A%2F%2Fwww.pythonpodcast.com%2Ffeed%2F&utm_source=rss&utm_medium=rss" style="border: 0; width: 0; height: 0;" width="0" />