Sequence diagrams

If you’re writing anything where the order of finely tuned events is important, then sequence diagrams might help you sort out the story.

I’ve written before about state diagrams. Sequence diagrams are another useful notation which I learned from software development. The origin of the notation is in telecomms and signal handling, where you need to make sure that messages are going to reach their target in the right order – or indeed that messages turning up in the wrong order will be handled gracefully.

A sequence diagram is a set of parallel lines representing entities, with arrows drawn between the lines representing messages and interactions.

In most of the software I’ve worked on, the messages are assumed to be passed instantly*. However, in fiction this may not be appropriate.

Let’s say that there are two friends who are separated and start sending messages to each other. Anna just wants to talk to her friend, but Hosni has something important he needs to tell Anna.

Anna and Hosni communicate when their messages are instantaneous

Anna and Hosni communicate when their messages are instantaneous

In this diagram, time goes down the page and the arrows indicate the direction and the content of the message. The dotted vertical lines – termed lifelines – represent the friends who are communicating.

Here, Anna is informed in a timely manner of the danger because the messages are being passed instantly.

But what if our friends are sending letters, and it takes a week for a letter to travel from one to the other? (note that I have shifted the labels to prevent the text being overrun by diagonal lines)

Anna and Hosni communicate when there is significant transmission lag in their messages

Anna and Hosni communicate when there is significant transmission lag in their messages

In this diagram, the message arrows are angled downwards to indicate that time passes during the transit of the message, which means that messages can be sent before another one has been received – there is a lot of potential for information to cross over between the two. Hosni sends his note about the plants at the same time as before, but Anna starts seeing evidence of the problem before Hosni’s message reaches her. That big “X” is called a destruction mark, and indicates the end of a lifeline.

Not a happy ending, although a better story.

As with state diagrams, sequence diagrams are not useful all the time but can help in thinking about tricky narratives where you are trying to ensure that things not only happen in the right order but that they can happen in the required order.

[*] I use sequence diagrams for modelling real-time and interactive systems rather than line protocol design.

2 Replies to “Sequence diagrams”

  1. “tricky narratives where you are trying to ensure that things not only happen in the right order but that they can happen in the required order.”

    (I may have talked about this before)

    Not only that they can happen in the right order, but that they fit together in terms of time. For example (and this particularly applies in mysteries, because readers are always looking for clues and slip-ups), if two characters are together at noon and then get together again at three p.m., they each have to have been doing three hours of stuff in between. This resulted in my having to cut a very nice scene from my first novel, for example, because it wouldn’t fit in terms of time. I’m dealing with this in my current story, too, since there are a lot of parallel tracks like this.

    1. Dunx says:

      Exactly.

      My novel Bluehammer has (in its current incarnation) some tricky event ordering which needs care – all of the narratives are sequential, but they are not simultaneous.

Leave a Reply