Tag: async
17 posts
-
WebSocket in C++ with Boost.Beast: Handshake, Frames, Ping/Pong and Common Failures
Solve real-time bidirectional communication in C++: WebSocket handshake and raw frames, Boost.Beast, Ping/Pong with timeouts, common errors, best.
-
RxJS 7 in Practice: Cold vs Hot, Flattening Operator Races, Error Placement and Subscription Leaks
How RxJS 7 behaves in real code: cold vs hot observables, switchMap, mergeMap, concatMap and exhaustMap races, catchError placement and subscription leaks.
-
Koa.js APIs: Context, Onion-Model Middleware, Routing, Auth and File Uploads
Building Node.js APIs with Koa: the context object, async onion-model middleware, routing, a REST API example, authentication, file uploads, database access and validation.
-
FastAPI in Production: Pydantic v2, async vs sync Endpoints, Dependency Injection and JWT
A practical FastAPI guide covering Pydantic v2 validation, async vs sync endpoint choice, dependency injection for testability, JWT auth, and the production gotchas each pattern glosses over.
-
Node.js Async Programming: Callbacks and Promises
Learn Node.js async I/O: callbacks, error-first style, Promises, async/await, the event loop, streams, and patterns for APIs and file pipelines.
-
JavaScript Async Programming: Promises, async/await, and the Event Loop Without the Usual Bugs
JavaScript asynchronous code explained: callbacks vs Promises, async/await, Promise combinators, the microtask queue, and fixes for real bugs such as unhandled rejections, timeouts that never cancel, retries that skip HTTP errors, and duplicate cached requests.
-
Kotlin Coroutines vs Threads: Cost, Dispatchers, Structured Concurrency and Cancellation
Comparison of Kotlin coroutines and OS threads: lightweight concurrency, memory overhead, scheduling, structured concurrency, Dispatchers.
-
Debugging Intermittent Unhandled Promise Rejections in Node.js: A Walkthrough
Why a Node.js API crashes with unhandled rejections only sometimes: early-created promises, return without await, Express 4 async routes, and fixes that hold.
-
Chat Server Architecture in C++: Scaling Out with Pub/Sub, Presence, Backpressure and Reconnects [#50-1]
Scale a C++ chat server past one process: gateway tiers, pub/sub fan-out, per-room sequence numbers, TTL-based presence, backpressure and jittered reconnects.
-
C++ Message Queues: RabbitMQ vs Kafka, Serialization and Error Handling
Complete message queue guide: Decouple services with AMQP and Kafka, producers and consumers, serialization strategies, backpressure handling.
-
Asio Deadlock Debugging: Async Callbacks, Locks, and Strands
Hidden deadlocks in Boost.Asio: mutex + condition_variable with async completion, lock ordering, and fixes with strands, std::lock, and thread dumps.
-
Boost.Asio Introduction: io_context and async_read
Learn Asio async I/O for C++: io_context, async_read, async_write, async_accept, steady_timer, error_code handling, shared_ptr buffers, and strand basics.
-
C++ packaged_task: Deferred Tasks, Futures, and Thread Pools
std::packaged_task is a C++11 feature that wraps a function or callable object and allows you to receive the result as a std::future.
-
C++20 Coroutines: promise_type, co_await Awaiters, Generators, and Task Types
C++20 coroutines: coroutine_handle, promise_type, co_await, generators, Task patterns, and compiler support for async-style control flow.
-
C++ std::future and std::promise: Passing Results Between Threads vs std::async
How std::future and std::promise pass a result between threads in C++, and the difference between this and using std::async directly.
-
std::async and Launch Policies: When async Actually Runs on Another Thread
What std::launch::async and deferred really do, why the default policy breaks wait_for loops, why the returned future blocks in its destructor, and exceptions.
-
Node.js & JavaScript Error Handling Best Practices
Node.js error handling for production: operational vs programmer errors, the three ways errors propagate, cause and captureStackTrace, fire-and-forget promises, EventEmitter error events, unhandled rejections, Express error middleware, and retries.