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
28
static/img/diagrams/connection_accept.mmd
Normal file
28
static/img/diagrams/connection_accept.mmd
Normal file
@ -0,0 +1,28 @@
|
||||
sequenceDiagram
|
||||
|
||||
participant ServerBuilder
|
||||
participant mio
|
||||
participant Accept
|
||||
participant WorkerClient
|
||||
|
||||
|
||||
ServerBuilder->>Accept: start(socks, workers)
|
||||
loop Continuous: poll
|
||||
Accept->>mio: mio::Poll::poll()
|
||||
alt poll() -> TIMER | CMD
|
||||
Accept-->>Accept: process_*
|
||||
else poll() -> NOTIFY
|
||||
Accept->>Accept: backpressure
|
||||
else poll() -> OTHER(token)
|
||||
Accept-->>Accept: accept_one(Conn)
|
||||
loop while exist WorkerClient
|
||||
Accept->>WorkerClient: send(Conn)
|
||||
alt send(Conn) -> Ok(_)
|
||||
Note over Accept: break loop
|
||||
else send(Conn) -> Err(_)
|
||||
Accept->>ServerBuilder: worker_faulted(idx)
|
||||
Accept->>Accept: remove worker, get next worker
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
Reference in New Issue
Block a user