Python Concurrency with Asyncio
Autor Matthew Fowleren Limba Engleză Paperback – mar 2022
Recomandăm această resursă dezvoltatorilor Python de nivel intermediar și avansat care se confruntă cu limitările de performanță ale execuției secvențiale. În Python Concurrency with Asyncio, descoperim o analiză pragmatică a modului în care biblioteca asyncio poate transforma aplicațiile lente în sisteme reactive de înaltă performanță. Considerăm că punctul forte al acestei lucrări este demistificarea modelului de execuție single-threaded, explicând cum pot fi gestionate sute de conexiuni simultane fără complexitatea și overhead-ul firelor de execuție tradiționale. Abordarea lui Matthew Fowler este una profund tehnică, trecând rapid de la conceptele de bază la implementări complexe de API-uri care rulează interogări asincrone către baze de date. Apreciem faptul că autorul nu izolează asyncio, ci îl plasează în contextul mai larg al ecosistemului Python, oferind strategii clare pentru integrarea cu multiprocessing atunci când sarcinile sunt intensive din punct de vedere CPU. Cititorul care a aplicat deja rețetele punctuale din asyncio Recipes va găsi aici arhitectura completă necesară pentru a construi sisteme robuste de la zero, beneficiind de o structură narativă care prioritizează scalabilitatea. Spre deosebire de manualele care tratează doar sintaxa, această carte de la Manning Publications se concentrează pe mecanismele interne ale buclei de evenimente (event loop). Structura celor 376 de pagini permite o tranziție fluidă de la simple cereri HTTP la gestionarea erorilor în medii concurente, oferind instrumentele necesare pentru a scrie cod care nu doar funcționează, ci este optimizat pentru sarcini I/O intensive.
Preț: 330.80 lei
Preț vechi: 413.51 lei
-20%
Carte disponibilă
Livrare economică 23 septembrie-07 octombrie
Specificații
ISBN-10: 1617298662
Pagini: 376
Dimensiuni: 190 x 234 x 22 mm
Greutate: 0.6 kg
Editura: Manning Publications
De ce să citești această carte
Pentru inginerii software care doresc să stăpânească asincronicitatea în Python, această carte oferă fundamentul teoretic și practic necesar. Veți câștiga abilitatea de a reduce drastic timpul de răspuns al aplicațiilor prin execuție concurentă, învățând să navigați prin complexitatea bibliotecii asyncio. Este un ghid esențial pentru oricine dezvoltă microservicii sau sisteme care depind de multiple surse de date externe.
Despre autor
Matthew Fowler este un specialist în dezvoltare software cu o experiență vastă în optimizarea sistemelor distribuite și a arhitecturilor asincrone. Expertiza sa în ecosistemul Python este reflectată în modul riguros în care abordează biblioteca asyncio, fiind recunoscut pentru capacitatea de a explica mecanismele de joasă barieră ale execuției concurente. Prin colaborarea cu editura Manning Publications, Fowler a creat un material de referință care face puntea între documentația tehnică aridă și implementarea în proiecte comerciale de anvergură.
Descriere scurtă
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.
Table of Contents
1 Getting to know asyncio
2 asyncio basics
3 A first asyncio application
4 Concurrent web requests
5 Non-blocking database drivers
6 Handling CPU-bound work
7 Handling blocking work with threads
8 Streams
9 Web applications
10 Microservices
11 Synchronization
12 Asynchronous queues
13 Managing subprocesses
14 Advanced asyncio