Python Concurrency with asyncio

0
(0)

Python Concurrency with asyncio
 

  • Author:Matthew Fowler
  • Length: 376 pages
  • Edition: 1
  • Publisher: Manning
  • Publication Date: 2022-03-15
  • ISBN-10: 1617298662
  • ISBN-13: 9781617298660
  • Sales Rank: #1440359 (See Top 100 Books)
  • Download:Register/Login to Download
  • Buy Print:Buy from amazon


    Book Description

    Learn how to speed up slow Python code with concurrent programming and the cutting-edge asyncio library.

    • 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

    Python is flexible, versatile, and easy to learn. It can also be very slow compared to lower-level languages. Python Concurrency with asyncio teaches you how to boost Python’s performance by applying a variety of concurrency techniques. You’ll learn how the complex-but-powerful asyncio library can achieve concurrency with just a single thread and use asyncio’s APIs to run multiple web requests and database queries simultaneously. The book covers using asyncio with the entire Python concurrency landscape, including multiprocessing and multithreading.

    About the technology

    It’s easy to overload standard Python and watch your programs slow to a crawl. Th e asyncio library was built to solve these problems by making it easy to divide and schedule tasks. It seamlessly handles multiple operations concurrently, leading to apps that are lightning fast and scalable.

    About the book

    Python Concurrency with asyncio introduces asynchronous, parallel, and concurrent programming through hands-on Python examples. Hard-to-grok concurrency topics are broken down into simple flowcharts that make it easy to see how your tasks are running. You’ll learn how to overcome the limitations of Python using asyncio to speed up slow web servers and microservices. You’ll even combine asyncio with traditional multiprocessing techniques for huge improvements to performance.

    What’s inside

    • 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

    About the reader

    For intermediate Python programmers. No previous experience of concurrency required.

    About the author

    Matthew Fowler has over 15 years of software engineering experience in roles from architect to engineering director.

    中文:

    书名:Python Concurrency with asyncio

    了解如何使用并发编程和尖端的Asyncio库来加速缓慢的Python代码。

    • 在使用Async/AWAIT语法的同时使用协同程序和任务来并发运行代码
    • 使用aiohttp构建Web API并发出并发Web请求
    • Run thousands of SQL queries concurrently
    • 创建可同时处理数GB数据的Map-Reduce作业
    • 使用带有Ayncio的线程来混合阻塞代码和Ayncio代码

    Python灵活、多才多艺,而且易于学习。与低级语言相比,它也可能非常慢。Python Concurrency with asyncio它教您如何通过应用各种并发技术来提高Python的性能。您将了解到复杂但功能强大的异步库如何通过单个线程实现并发,并使用异步库的API同时运行多个Web请求和数据库查询。本书介绍了如何在整个Python并发环境中使用Ayncio,包括多处理和多线程。

    About the technology

    很容易重载标准的Python,然后眼睁睁地看着程序慢得像爬虫一样。异步库就是为了解决这些问题而构建的,它使任务的划分和调度变得容易。它无缝地同时处理多个操作,导致应用程序闪电般的速度和可扩展。

    About the book

    Python Concurrency with asyncio通过实际操作的Python示例介绍了异步、并行和并发编程。难以理解的并发主题被分解为简单的流程图,便于查看任务的运行情况。您将了解如何使用asyncio来提高速度较慢的Web服务器和微服务的速度,从而克服Python的局限性。您甚至可以将Asyncio与传统的多处理技术相结合,从而极大地提高性能。

    What’s inside

    • 使用aiohttp构建Web API并发出并发Web请求
    • Run thousands of SQL queries concurrently
    • 创建可同时处理数GB数据的Map-Reduce作业
    • 使用带有Ayncio的线程来混合阻塞代码和Ayncio代码

    About the reader

    适用于中级的Python程序员。不需要以前的并发经验。

    About the author

    Matthew Fowler他在从架构师到工程总监的职位上拥有超过15年的软件工程经验。

  • 下载电子版:下载地址
  • 购买纸质版:亚马逊商城

    点击星号评分!

    平均分 0 / 5. 投票数: 0

    还没有投票!请为他投一票。

  • 推荐阅读

    评论 抢沙发

    评论前必须登录!

     

    登录

    找回密码

    注册