Communicating flow with sequence diagrams
Sequence diagrams are another popular UML diagram. Sequence diagrams show a top-to-bottom flow of events as various systems and components interact to carry out a task.
Let’s add a Mermaid code cell to define a request from a client (such as a browser or desktop app) to a server and its underlying database:
sequenceDiagram Client->>Server: Request Data Server->>Database: SQL Query Database-->>Server: Query Results Server-->>Client: JSON Data
This syntax may not be exactly like others, but it should be familiar by this point in the chapter.
Notice how ->>
syntax indicates a request and -->>
indicates a response. This syntax governs whether the dotted line is shown on the relationship as illustrated in Figure 13.14:
Figure 13.14 – A sequence diagram
Our sequence...