#AsynchronousProgramming

2025-06-08

kitfucoda.medium.com/beyond-ha

The revelation came when I was adding a scheduler to the chatbot: What if I remove the hardcoding on the synchronization primitives? That worked right away, and as a bonus, it fixed all the unexplained problems I had with tests. It is interesting to see how a sudden flash of insight impacts the thought process and changes how code is written.

As shown in the article last week, we start from the main process, beginning with the setup of a ProcessPoolExecutor. All the synchronization primitives are sent individually to the run() function this time, given the simplified scope of this article. The setup for the FastAPI web module handles receiving a batch of data.

The background processing module was very basic, mostly just a proof-of-concept. Comparing the tests for the FastAPI application and the background module, the benefit is more apparent in the latter case. With the explicit passing of the queue object as an argument, there’s no more guesswork on which queue to patch in test.

Plus, as we are ensuring both the test and application are referring to the same queue now, we can pass real data into test, and ensure they are being received properly. Documenting the insight into blog posts can be seen as my attempt to think out loud. Perhaps we can go through the process of adapting it to our setup in a more generalized form in a future article.

#Python #FastAPI #AsynchronousProgramming #SoftwareArchitecture #UnitTesting #opentowork #fedihire #getfedihired

2025-05-31

Callback Hell là gì?

Callback Hell là gì? Callback Hell, hay còn gọi là "địa ngục hồi gọi", là một vấn đề thường gặp trong lập trình bất đồng bộ, đặc biệt là khi sử dụng JavaScript. Nó xảy ra khi nhiều hàm gọi lại (callbacks) được lồng nhau, tạo ra một cấu trúc mã khó đọc, khó bảo trì và khó gỡ lỗi.

bietduoc.io.vn/2025/05/31/call

2025-05-04

A project recently tackled the challenge of taking a local command-line game and making it accessible remotely over SSH. Inspired by interactive SSH applications seen elsewhere, the exploration focused on using Python and the AsyncSSH library.

The work involved discovering effective methods for handling interactive input and output over SSH channels, learning how libraries abstract away network complexities, and ensuring the application handled multiple user sessions correctly. AsyncSSH proved a capable tool for this task.

The result is a functional game running over SSH, demonstrating how existing CLI concepts can be adapted for remote access. This opens possibilities for serving text-based interfaces (TUI) directly via SSH.

kitfucoda.medium.com/the-quest

#Python #SSH #AsynchronousProgramming #DeveloperExperience #opentowork #getfedihired #fedihire

OmarEbnElKhattab Hosneyhosney@me.dm
2025-04-23

🚀 Boost Python Efficiency with asyncio

Synchronous: Toast 🥪 → wait → Coffee ☕ → wait → Eat.

Asynchronous: Start Toast 🍞 & Coffee ☕ → Fry Eggs 🍳 → Eat sooner!

Python's asyncio lets you run tasks concurrently, reducing wait times.

Key Terms:

Event Loop: Task scheduler.

await: Pause & switch tasks.

Coroutines: Async functions.

#Python #Asyncio #AsynchronousProgramming

medium.com/@omkamal/a-beginner

2025-04-01

kitfucoda.medium.com/asyncio-t

Just finished a deep dive into AsyncIO, building an asynchronous task scheduler! It's been a fascinating exploration of tasks, futures, and how to manage both I/O and CPU-bound operations. Real-world examples like API data fetching and complex calculations were used to demonstrate its capabilities.

Covered task management essentials: cancellation, graceful shutdowns, and building a CLI for interactive control. Tackled tricky AsyncIO parts like error and signal handling, ensuring the scheduler's robustness.

A key focus was on asyncio.create_task() vs. await, and strategies for managing background tasks and uncaught exceptions. It was a great learning experience.

If you're into Python and asynchronous programming, this might be of interest! #Python #AsyncIO #AsynchronousProgramming #TaskScheduling #getfedihired #fedihire #opentowork

2025-03-22

Selecting the right message broker for your application demands a deep understanding of available options & messaging patterns.

Critical factors include: traffic, auto-scaling, poison pill tolerance, batch processing, and ordering.

Read the #InfoQ article by Nehme Bilal and get it right: bit.ly/4iv41IW

#SoftwareArchitecture #EventDrivenArchitecture #ApacheKafka #AsynchronousProgramming #CloudComputing

.NET async/await dans tous ses états

2 avril 2025, 19:00:00 CEST - GMT+2 - La Cantine by La Mêlée, Toulouse

mobilizon.mtg-france.org/event

Banner
2025-02-11

Master Async JavaScript Await & error handling in nested async calls. Learn best practices for structuring code to prevent silent failures & build robust apps.

tech-champion.com/javascript/a

2023-08-17

So now I am a bit puzzled. Just use request.Session for the majority of smaller cases, and for many requests use concurrent.futures?

What is your experience? Are there particular reasons you would use httpx over requests or concurrent.futures? E.g. scaling, asyncio, HTTP/2 support, other?

Curious to hear ...

#requests #pythonlibraries #asynchronousprogramming

2023-02-07

In this #InfoQ article, we want to show how achieving #concurrency is the result of an appropriate design. To illustrate these concepts Enrico Piccinin uses, as an example, the Hilbert’s Hotel mathematical problem.

More insights: bit.ly/3YvtdEQ

#ParallelProgramming #AsynchronousProgramming #ProgrammingLanguages

Client Info

Server: https://mastodon.social
Version: 2025.04
Repository: https://github.com/cyevgeniy/lmst