diff --git a/web/packages/teleterm/README.md b/web/packages/teleterm/README.md index 00ba036820e..38758bc586a 100644 --- a/web/packages/teleterm/README.md +++ b/web/packages/teleterm/README.md @@ -248,7 +248,34 @@ resource availability as possible. ### PTY communication overview (Renderer Process <=> Shared Process) -![PTY communication](docs/ptyCommunication.png) +```mermaid +sequenceDiagram + autonumber + participant DT as Document Terminal + participant PS as PTY Service + participant PHS as PTY Host Service + participant PP as PTY Process + + DT->>PS: wants new PTY + Note over PS,PHS: gRPC communication + PS->>PHS: createPtyProcess(options) + PHS->>PP: new PtyProcess() + PHS-->>PS: ptyId of the process is returned + PS->>PHS: establishExchangeEvents(ptyId) channel + Note right of DT: client has been created,
so PTY Service can attach
event handlers to the channel
(onData/onOpen/onExit) + PS-->>DT: pty process object + DT->>PS: start() + PS->>PHS: exchangeEvents.start() + Note left of PP: exchangeEvents attaches event handlers
to the PTY Process (onData/onOpen/onExit) + PHS->>PP: start() + PP-->>PHS: onOpen() + PHS-->>PS: exchangeEvents.onOpen() + PS-->>DT: onOpen() + DT->>PS: dispose() + PS->>PHS: end exchangeEvents channel + PHS->>PP: dispose process and remove it + +``` ### Overview of a deep link launch process diff --git a/web/packages/teleterm/docs/ptyCommunication.png b/web/packages/teleterm/docs/ptyCommunication.png deleted file mode 100644 index b979317d64a..00000000000 Binary files a/web/packages/teleterm/docs/ptyCommunication.png and /dev/null differ diff --git a/web/packages/teleterm/docs/ptyCommunication.txt b/web/packages/teleterm/docs/ptyCommunication.txt deleted file mode 100644 index 82defea62b7..00000000000 --- a/web/packages/teleterm/docs/ptyCommunication.txt +++ /dev/null @@ -1,30 +0,0 @@ -#Source of ptyCommunication.png -title PTY Communication - -Document Terminal->PTY Service: wants new PTY -note over PTY Service,PTY Host Service: gRPC communication -PTY Service->PTY Host Service: createPtyProcess(options) -PTY Host Service->PTY Process: new PtyProcess() -PTY Host Service->PTY Service: ptyId of the process is returned -PTY Service->PTY Host Service: establish exchangeEvents(ptyId) channel -note left of PTY Service: -client has been created, -so PTY Service can attach event handlers -to the channel (onData/onOpen/onExit) -end note -PTY Service->Document Terminal: pty process object -Document Terminal->PTY Service: start() -PTY Service->PTY Host Service: exchangeEvents.start() -note right of PTY Host Service: -exchangeEvents attaches event handlers -to the PTY Process (onData/onOpen/onExit) -end note -PTY Host Service->PTY Process: start() - -PTY Process->PTY Host Service: onOpen() -PTY Host Service->PTY Service: exchangeEvents.onOpen() -PTY Service->Document Terminal: onOpen() - -Document Terminal->PTY Service: dispose() -PTY Service->PTY Host Service: end exchangeEvents channel -PTY Host Service->PTY Process: dispose process and remove it