Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
The multi-threaded, event-based architecture was too complicated and prevented introducing protobuf channels. The new CommandServer functions on the same principle as the proxy logic of Sōzu: listen to events with Mio in an event loop, dispatch the events accordingly by creating WorkerSessions, ClientSessions. This new CommandServer allows to create Tasks, that can scatter requests to all workers, gather their responses as the event loop goes, and invoke the task finish() when all responses are gathered. A worker whose unix socket is disconnected will be killed, and automatically restarted if configurated to. Conversely, if the main process dies, the orphaned workers will perform a hard stop. Sōzu channels used everywhere for communication with workers and clients. Automatic counting and respawning of workers, at each tick implement soft stop and hard stop improve CLI: - disable logging in CLI when displaying JSON - sort list of workers when displaying status error handling with thiserror remove obsolete documentation on managing workers remove unused dependencies: smol, futures, futures-lite, anyhow Co-Authored-By: Emmanuel BOSQUET <[email protected]>
- Loading branch information