Skip to content

Instantly share code, notes, and snippets.

@blueset

blueset/fig0.puml

Last active Jan 31, 2020
Embed
What would you like to do?
@startuml
skinparam monochrome true
skinparam backgroundColor #fefefe
skinparam sequenceReferenceAlign center
skinparam sequenceMessageAlign center
actor User
== Send message ==
User -> Client: 1.1. Send message
activate Client
Client -> Server: 1.1.1. Deliver message
activate Server
Server -> Server: 1.1.2. Verify message content
activate Server
deactivate Server
Server -> : 1.1.3 Send to recipient
Server --> Client: 1.1.4. Delivery receipt
deactivate Server
deactivate Client
== Receive message ==
Server <- : 1.2. Receive new message
activate Server
Server -> Client: 1.2.1 Notify client
activate Client
Client -> Server: 1.2.2. Retrieve message
activate Server
Client <-- Server: message
deactivate Server
deactivate Server
Client -> User: 1.2.3 Notify user
deactivate Client
@enduml
@startuml
skinparam monochrome true
skinparam backgroundColor #fefefe
skinparam sequenceReferenceAlign center
skinparam sequenceMessageAlign center
actor User
participant "Telegram Bot API" as API
participant ETM
participant "Slave Channels\n//(via framework)//" as Slave
== Send message ==
User -> API: 2.1. Send message
activate API
API -> ETM: 2.1.1. Receive message
deactivate API
activate ETM
ETM -> ETM: 2.1.2. Verify & transform
activate ETM
deactivate ETM
ETM -> Slave: 2.1.3. Send message
activate Slave
|||
Slave --> ETM: Message ID
deactivate Slave
ETM -> ETM: 2.1.4. Record message
activate ETM
deactivate ETM
|||
deactivate ETM
== Receive message ==
Slave <- : 2.2. Receive message
activate Slave
Slave -> ETM: 2.2.1. Deliver message
deactivate Slave
activate ETM
ETM -> ETM: 2.2.2. Verify & transform
activate ETM
deactivate ETM
ETM -> API: 2.2.3. Send message
activate API
API --> ETM: Message ID
deactivate API
ETM -> ETM: 2.1.4. Record message
activate ETM
deactivate ETM
deactivate ETM
@enduml
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment