Building Customized Async Web Protocol from AsyncIO: Exploring the low-level APIs Protocol and Transport

姜韋辰(daniel)

姜韋辰(daniel)

我是一名後端工程師,熟悉常用的python web框架,喜歡挑戰各種業務場景的服務。專注於系統開發以及服務優化,因應業務需求,偶而也會下海寫寫前端,最近比較著迷infra相關建置及維護。

    Abstract

    Despite their powerful features and flexibility, the low-level APIs for library and framework developers provided in Asyncio are underutilized. One reason might be the high entry barrier – prerequisites like understanding protocols knowledge and asynchronous design patterns. I am sharing my humble experience with Asyncio here. I show you how to implement a network protocol, specifically Websocket, with Protocol and Transport, two of the staple low-level APIs in the package. You will learn how to establish a consensual connection and communicate between the server and the client. While the main focus is on low-level APIs (e.g., we will use Transport to send messages to another endpoint) , we will be using some high-level APIs (e.g., StreamReader, Queue) for auxiliary purposes like message handling. It is hoped that the techniques and familiarity gained with asyncio serve as the basis for your customized network protocol and libraries, even for commercial purposes, in the future.

    Description

    Video

    Location

    R0

    Date

    Day 1 • 13:30-14:00 (GMT+8)

    Language

    Chinese talk w. English slides

    Level

    Experienced

    Category

    Python Core