mirror of
https://github.com/actix/actix-website
synced 2025-06-27 23:49:02 +02:00
Architecture diagrams of HttpServer and Connection lifecycle (#148)
* 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
This commit is contained in:
committed by
Yuki Okushi
parent
53214f4727
commit
c1a8103cbc
34
static/img/diagrams/connection_worker.mmd
Normal file
34
static/img/diagrams/connection_worker.mmd
Normal file
@ -0,0 +1,34 @@
|
||||
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
|
Reference in New Issue
Block a user