Skip to content

Instantly share code, notes, and snippets.

@VladimirAlexiev
Created September 27, 2019 09:57
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save VladimirAlexiev/23bc3067176cd25682077303b4207591 to your computer and use it in GitHub Desktop.
Save VladimirAlexiev/23bc3067176cd25682077303b4207591 to your computer and use it in GitHub Desktop.
plantuml asciiArt

From the discussion https://forum.plantuml.net/4147, this is an example of a sequence diagram rendered as Unicode AsciiArt, limited to 78 chars, for embedding into an IETF RFC.

puml -tutxt sequence-asciiArt.puml

I can't believe how usable the ascii version is! See png version at https://i.imgur.com/zGFzsrI.png

@startuml
skinparam maxAsciiMessageLength 8
title RUE Automatic Configuration
box "RUE Side" #5fddd6
actor "RUE User" as RUEUSER
participant "RUE" as RUE
end box
box "Domain Name Service" #bb7068
participant DNS
end box
box "Configuration Service" #5c7068
participant "HTTPS Server" as CONFIGSERVER
participant "Provider Global Settings" AS PROVIDERSETTINGS
end box
box "Customer Relationship Management" #6fc65f
participant "CRM"
end box
autonumber "<b>[0]"
RUEUSER -> RUE: Select a VRS Provider name
RUE -> DNS: Look up SRV DNS for _rueconfig._tcp.providerdomain.com
DNS -> RUE: SRV DNS response with server.providerdomain.com:443
RUE -> DNS: If SRV record found, look up DNS for server.providerdomain.com
RUE -->> DNS: If SRV record does not exist, look up DNS for config.providerdomain.com
DNS -> RUE: IP Address of Config Server
RUE -> CONFIGSERVER: TCP connection to 443: TLS: ClientHello (RFC-5246)
CONFIGSERVER -> RUE: TLS: ServerHello
CONFIGSERVER -> RUE: TLS: ServerCertificate
CONFIGSERVER -->> RUE: TLS: ServerKeyExchange if required for premaster secret handshake
CONFIGSERVER -> RUE: TLS: ServerHelloDone
RUE -> CONFIGSERVER: HTTP: GET https://config.providerdomain.com/v1
CONFIGSERVER -> RUE: HTTP: 401 Unauthorized WWW-Authenticate Digest\nusername="X" realm="Y" qop="auth,auth-int" nonce=...
RUE -> CONFIGSERVER: HTTP: https://config.providerdomain.com/v1 Authorization Digest\nusername="X" realm="Y" qop="auth" nonce=...
CONFIGSERVER -> CRM: Find subscriber information\nfor username="X"
CRM -> CONFIGSERVER: Subscriber specific\nconfiguration information
CONFIGSERVER -> PROVIDERSETTINGS: Retrieve provider specific settings
PROVIDERSETTINGS -> CONFIGSERVER: Provider specific configuration information
CONFIGSERVER -> RUE: 200 OK + JSON key/value hash merge of subscriber specific and\nprovider specific configurations
@enduml
RUE Automatic Configuration
┌─┐
║"│
└┬┘
┌┼┐
│ ┌───┐ ┌───┐ ┌────────────┐ ┌────────────────────────┐ ┌───┐
┌┴┐ │RUE│ │DNS│ │HTTPS Server│ │Provider Global Settings│ │CRM│
RUE User └─┬─┘ └─┬─┘ └─────┬──────┘ └───────────┬────────────┘ └─┬─┘
[1] Select a VRS Provider name │ │ │
│ ───────>│ │ │ │ │
│ │ │ │ │ │
[2] Look up SRV DNS for _rueconfig._tcp.providerdomain.com │
│ │──────>│ │ │ │
│ │ │ │ │ │
[3] SRV DNS response with server.providerdomain.com:443 │ │
│ │<──────│ │ │ │
│ │ │ │ │ │
[4] If SRV record found, look up DNS for server.providerdomain.com │
│ │──────>│ │ │ │
│ │ │ │ │ │
[5] If SRV record does not exist, look up DNS for config.providerdomain.com
│ │ ─ ─ ─>│ │ │ │
│ │ │ │ │ │
[6] IP Address of Config Server │ │
│ │<──────│ │ │ │
│ │ │ │ │ │
[7] TCP connection to 443: TLS: ClientHello (RFC-5246) │ │
│ │─────────────────>│ │ │
│ │ │ │ │ │
│ [8] TLS: ServerHello │ │
│ │<─────────────────│ │ │
│ │ │ │ │ │
│ [9] TLS: ServerCertificate │ │
│ │<─────────────────│ │ │
│ │ │ │ │ │
[10] TLS: ServerKeyExchange if required for premaster secret handshake │
│ │<─ ─ ─ ─ ─ ─ ─ ─ ─│ │ │
│ │ │ │ │ │
│ [11] TLS: ServerHelloDone │ │
│ │<─────────────────│ │ │
│ │ │ │ │ │
[12] HTTP: GET https://config.providerdomain.com/v1 │ │
│ │─────────────────>│ │ │
│ │ │ │ │ │
[13] HTTP: 401 Unauthorized WWW-Authenticate Digest │ │
username="X" realm="Y" qop="auth,auth-int" nonce=... │ │
│ │<─────────────────│ │ │
│ │ │ │ │ │
[14] HTTP: https://config.providerdomain.com/v1 Authorization Digest │
username="X" realm="Y" qop="auth" nonce=... │ │
│ │─────────────────>│ │ │
│ │ │ │ │ │
│ │ │ │ [15] Find subscriber information │
│ │ │ │ for username="X" │ │
│ │ │ │ ─────────────────────────────────────>│
│ │ │ │ │ │
│ │ │ │ [16] Subscriber specific │
│ │ │ │ configuration information │
│ │ │ │ <─────────────────────────────────────│
│ │ │ │ │ │
│ │ │ [17] Retrieve provider specific settings │
│ │ │ │ ────────────────────> │
│ │ │ │ │ │
│ │ [18] Provider specific configuration information │
│ │ │ │ <──────────────────── │
│ │ │ │ │ │
[19] 200 OK + JSON key/value hash merge of subscriber specific and │
provider specific configurations │ │ │
│ │<─────────────────│ │ │
RUE User ┌─┴─┐ ┌─┴─┐ ┌─────┴──────┐ ┌───────────┴────────────┐ ┌─┴─┐
┌─┐ │RUE│ │DNS│ │HTTPS Server│ │Provider Global Settings│ │CRM│
║"│ └───┘ └───┘ └────────────┘ └────────────────────────┘ └───┘
└┬┘
┌┼┐
┌┴┐
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment