SequenceDiagram [label="Hi/Lo algorithm"] {
actor alice as "Alice" [color="#ffc107" fillcolor="#ffc107"]
lifeline "Database" as db [color="#007bff"]
actor bob as "Bob" [color="#28a745" fillcolor="#28a745"]
alice --> db "get the next hi value"
activate db
alice --> db "hi = 3, lo = 0, Id = 7"
bob --> db "get the next hi value"
bob --> db "hi = 4, lo = 0, Id = 10"
alice --> db "hi = 3, lo = 1, Id = 8"
alice --> db "hi = 3, lo = 2, Id = 9"
bob --> db "hi = 4, lo = 1, Id = 11"
alice --> db "get the next hi value"
bob --> db "hi = 4, lo = 2, Id = 12"
alice --> db "hi = 5, lo = 0, Id = 13"
}
In PlantUML format.
@startuml
actor Alice
database Database
actor Bob
Alice -> Database : get the next hi value
activate Database
Alice -> Database : hi = 3, lo = 0, Id = 7
Bob -> Database : get the next hi value
Bob -> Database : hi = 4, lo = 0, Id = 10
Alice -> Database : hi = 3, lo = 1, Id = 8
Alice -> Database : hi = 3, lo = 2, Id = 9
Bob -> Database : hi = 4, lo = 1, Id = 11
Alice -> Database : get the next hi value
Bob -> Database : hi = 4, lo = 2, Id = 12
Alice -> Database : hi = 5, lo = 0, Id = 13
@enduml
Licensing
I, the copyright holder of this work, hereby publish it under the following licenses:
Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.2 or any later version published by the Free Software Foundation; with no Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts. A copy of the license is included in the section entitled GNU Free Documentation License.http://www.gnu.org/copyleft/fdl.htmlGFDLGNU Free Documentation Licensetruetrue
to share – to copy, distribute and transmit the work
to remix – to adapt the work
Under the following conditions:
attribution – You must give appropriate credit, provide a link to the license, and indicate if changes were made. You may do so in any reasonable manner, but not in any way that suggests the licensor endorses you or your use.
share alike – If you remix, transform, or build upon the material, you must distribute your contributions under the same or compatible license as the original.
{{subst:Upload marker added by en.wp UW}} {{Information |Description = {{en|A sequence diagram illustrating the Hi/Lo algorithm.}} |Source = Made it using the Graphviz DOT language |Date = 2019-11-28 |Author = Frap }} <source> SequenceDiagram [label="Hi/Lo algorithm"] { actor alice as "Alice" [color="#ffc107" fillcolor="#ffc107"] lifeline "Database" as db [color="#007bff"] actor bob as "Bob" [color="#28a745" fillcolor="#28a745"] alice --> db "g...