mirror of
https://github.com/actix/actix-website
synced 2024-12-18 18:03:12 +01:00
c1a8103cbc
* add arch diagrams and menu * fix colors for arch diagrams * refine architecture diagrams, ready for review * capitalize titles and add mmdc instruction * apply code review requested changes * Add links to accept, worker and dispatcher too
35 lines
973 B
Plaintext
35 lines
973 B
Plaintext
sequenceDiagram
|
|
|
|
participant ServerBuilder
|
|
participant WorkerClient
|
|
participant Worker
|
|
participant StreamService
|
|
participant HttpServiceHandler
|
|
participant Tokio
|
|
|
|
ServerBuilder-->>Tokio: spawn(Worker)
|
|
|
|
Tokio-->>Worker: poll()
|
|
alt WorkerState::Available
|
|
loop
|
|
Worker->>WorkerClient: rx.poll_next()
|
|
WorkerClient->>Worker: WorkerCommand(Conn)
|
|
Worker->>Worker: check_readiness()
|
|
alt check_readiness() -> Ok(true)
|
|
Note over Worker,StreamService: Worker::services[Conn.token]
|
|
Worker-->>StreamService: call(ServerMessage::Connect(stream))
|
|
StreamService->>HttpServiceHandler: call(stream)
|
|
HttpServiceHandler->>StreamService: HttpServiceHandlerResponse as Future
|
|
StreamService->>Tokio: spawn(HttpServiceHandlerResponse)
|
|
|
|
else check_readiness() -> Ok(false)
|
|
Worker-->>Worker: WorkerState::Unavailable
|
|
else check_readiness() -> Err(token,idx)
|
|
Worker-->>Worker: WorkerState::Restarting
|
|
end
|
|
end
|
|
end
|
|
|
|
|
|
Note over HttpServiceHandler: process connection
|