书籍 Python Concurrency with asyncio的封面

Python Concurrency with asyncio

Matthew Fowler

出版时间

2021-05-03

ISBN

9781617298660

评分

★★★★★
书籍介绍

Python Concurrency with asyncio teaches you to write concurrent Python code that will boost the speed of your apps and APIs. The book demystifies asynchio's unique single-threaded concurrency model, giving you a behind-the-scenes understanding of the library and its new async/await syntax. Hard-to-grok concurrency topics are broken down into simple flowcharts so you can easily see how your coroutines and tasks are running.

You'll learn to apply asyncio to solve common performance problems, such as batch database jobs, slow web servers, and scaling microservices. All examples you'll build are designed to be usable in the real world, including a clever command line SQL client that can run multiple slow queries at the same time. By the time you're done, you'll even be able to combine asyncio with traditional multiprocessing and multithreading techniques for huge improvements to performance.

what's inside

Use coroutines and tasks alongside async/await syntax to run code concurrently

Build web APIs and make concurrency web requests with aiohttp

Run thousands of SQL queries concurrently

Create a map-reduce job that can process gigabytes of data concurrently

Use threading with asyncio to mix blocking code with asyncio code

Matthew Fowler has over 15 years of software engineering experience in roles from architect to engineering director. He has worked on Python codebases in the machine learning space, as well as led development of a Python-based ecommerce site with tens of millions of users.

用户评论
对 python 异步编程的理解很有帮助,受益匪浅
TODO: chapter 3, 8 async socket, selector, Stream
神作。1.深入浅出的讲解,不会过分挖入细节,也不会只讲细节不讲宏观概念。2.代码基本可以正常执行,而且一步一步从简单例子开始逐渐深入优化。3.篇幅简洁。知识密度大,在python 协程领域,目前看到的最为优秀的书籍。4. 事件轮询!under the hood。