-
Notifications
You must be signed in to change notification settings - Fork 17
Open
Description
web-hacker works successfully in standalone scripts, but I recently needed to integrate its monitoring capabilities (specifically the logic within cdp/) into a high-concurrency FastAPI server.
Because the current implementation relies on synchronous libraries (websocket-client, threading.Condition) and blocking I/O, it is difficult to use directly within an asyncio event loop (e.g., websockets or aiohttp) without blocking the main thread or wrapping everything in thread executors.
It would be useful to have "async" equivalents of the core monitors, such as AsyncNetworkMonitor, AsyncStorageMonitor, etc., that decouple the business logic from the transport layer. That would involve:
- Transport abstraction to allow monitors to accept a generic
send_commandcallback (returning anAwaitable) rather than a specific synchronouswebsocketinstance. - Async class analogues,
Asyncversions of the monitors that useasync/awaitfor message handling and command execution.
Metadata
Metadata
Assignees
Labels
No labels