USING ASYNCHRONOUS PROGRAMMING IN PYTHON TO IMPROVE APPLICATION PERFORMANCE
Kokalko Mykola , Senior Software Engineer at Uvik, Hollywood, FL, USAAbstract
Asynchronous programming in Python is a powerful tool for improving application performance by effectively managing multitasking. The main focus is on the use of the async and await keywords, as well as the asyncio, ThreadPoolExecutor and ProcessPoolExecutor libraries, which play an important role in organizing multitasking processes. This is especially true for applications related to I/O operations, such as web servers and APIs. The use of asynchronous programming allows you to eliminate thread locks and optimize query processing, which makes applications more responsive and scalable. The article provides specific examples of using the asynchronous approach in practice, including parallel task execution and resource management. In addition, the study demonstrates that the introduction of asynchronous technologies helps to reduce infrastructure costs, ensuring high throughput and stable operation even under high load conditions. Asynchronous programming stands out for its flexibility and the ability to create high-performance systems that are capable of handling a large number of simultaneous I/O operations.
Keywords
Asynchronous programming, Python, asyncio, ThreadPoolExecutor
References
signal — Set handlers for asynchronous events. [Electronic resource] Access mode: https://docs.python.org/3/library/signal.html (accessed 12.10.2024).
Hunt J. Concurrency with AsyncIO //Advanced Guide to Python 3 Programming. - Cham : Springer International Publishing, 2023. – pp. 493-503.
Ganja M., Alimadadi S., Tip F. Code coverage criteria for asynchronous programs //Proceedings of the 31st ACM Joint European Software Engineering Conference and Symposium on the Foundations of Software Engineering. - 2023. – pp. 1307-1319.
Hoelscher M. M. et al. LABS: Laboratory Automation and Batch Scheduling–A Modular Open Source Python Program for the Control of Automated Electrochemical Synthesis with a Web Interface //Chemistry–An Asian Journal. – 2023. – Vol. 18. – No. 14. – p. e202300380.
Potashov A.V. PYTHON for the server side of highly loaded web applications //BBK 1 N 34. – p. 2767.
FastAPI Basics. [Electronic resource] Access mode: https://alex-podrabinovich.medium.com/html-%D0%BE%D1%81%D0%BD%D0%BE%D0%B2%D1%8B-fastapi-da782612d3e5( accessed 12.10.2024).
Welcome to AIOHTTP. [Electronic resource] Access mode: https://docs.aiohttp.org/en/stable /(accessed 12.10.2024).
Databases. [Electronic resource] Access mode: https://github.com/encode/databases (accessed 12.10.2024).
Wilkes M., Wilkes M. Parallelization and async //Advanced Python Development: Using Powerful Language Features in Real-World Applications. – 2020. – pp. 283-344.
Development of real-time applications with Python and WebSocket. [Electronic resource] Access mode: https://habr.com/ru/companies/otus/articles/770256 /(accessed 12.10.2024).
Asynchronous Processing in System Design. [Electronic resource] Access mode: https://tr-page .yandex.ru/translate?lang=en-ru&url=https%3A%2F%2Fwww.geeksforgeeks.org%2Fasynchronous-processing-in-system-design%2F( accessed 12.10.2024).
Asyncio Queue in Python. [Electronic resource] Access mode: https://superfastpython.com/asyncio-queue /(accessed 12.10.2024).
Article Statistics
Copyright License
Copyright (c) 2024 Kokalko Mykola

This work is licensed under a Creative Commons Attribution 4.0 International License.
Authors retain the copyright of their manuscripts, and all Open Access articles are disseminated under the terms of the Creative Commons Attribution License 4.0 (CC-BY), which licenses unrestricted use, distribution, and reproduction in any medium, provided that the original work is appropriately cited. The use of general descriptive names, trade names, trademarks, and so forth in this publication, even if not specifically identified, does not imply that these names are not protected by the relevant laws and regulations.