We're sorry but this page doesn't work properly without JavaScript enabled. Please enable it to continue.
Feedback

gRPC Python, C Extensions, and AsyncIO

Formale Metadaten

Titel
gRPC Python, C Extensions, and AsyncIO
Untertitel
How to make AsyncIO work with the gRPC Core
Serientitel
Anzahl der Teile
130
Autor
Lizenz
CC-Namensnennung - keine kommerzielle Nutzung - Weitergabe unter gleichen Bedingungen 3.0 Unported:
Sie dürfen das Werk bzw. den Inhalt zu jedem legalen und nicht-kommerziellen Zweck nutzen, verändern und in unveränderter oder veränderter Form vervielfältigen, verbreiten und öffentlich zugänglich machen, sofern Sie den Namen des Autors/Rechteinhabers in der von ihm festgelegten Weise nennen und das Werk bzw. diesen Inhalt auch in veränderter Form nur unter den Bedingungen dieser Lizenz weitergeben
Identifikatoren
Herausgeber
Erscheinungsjahr
Sprache

Inhaltliche Metadaten

Fachgebiet
Genre
Abstract
Goal - Encourage Python developers to understand C extensions by sharing gRPC Python’s practice, and advocate the adoption of AsyncIO. Prerequisite - Understand thread vs. process; - Interested in asynchronous programming. gRPC Brief - What’s gRPC Core? And what is gRPC Python? Cython To The Rescue - Why we picked Cython among all other available tools (e.g., pybind11, ctypes) - Debuggability: pdb & gdb The GIL Friction - How to delegate work to C extension - How to make multithreading work AsyncIO Topic - Not blocking the loop, the main headache. - Non-blocking I/O solution 1: replacing C libraries’ I/O operations - Non-blocking I/O solution 2: dedicated background poller thread - Performance improvement (10k -> 20k for client, 4k -> 16k for server) Migration to AsyncIO - Tolerate multithreading and AsyncIO in the same application - Make both API co-existable in the same application