1
0
mirror of https://github.com/actix/actix-website synced 2025-06-27 15:39: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:
Maxim Vorobjov
2020-01-28 14:36:35 +03:00
committed by Yuki Okushi
parent 53214f4727
commit c1a8103cbc
14 changed files with 265 additions and 0 deletions

View File

@ -0,0 +1,29 @@
sequenceDiagram
participant HttpServer
participant HttpServiceHandler
participant HSHR
participant State
participant Dispatcher
participant Tokio
Note over HSHR, State: HttpServiceHandlerResponse
HttpServer-->>HttpServiceHandler: eventually build...
alt Protocol::HTTP1
HttpServiceHandler->>Dispatcher: H1::Dispatcher::new()
HttpServiceHandler->>State: State::H1(Dispatcher)
else Protocol::HTTP2
HttpServiceHandler->>State: State::H2Handshake
end
HttpServiceHandler->>HSHR: HttpServiceHandlerResponse::new(State)
HttpServiceHandler-->>Tokio: StreamService->Tokio::spawn(HttpServiceHandlerResponse as Future)
Tokio->>HSHR: poll()
alt State::H2Handshake
HSHR->>Dispatcher: H2::Dispatcher::new(stream,services)
HSHR->>HSHR: poll()
else
HSHR->>Dispatcher: poll()
end
Note over Dispatcher: requests loop