Can you recommend a good approach how to model a communication pattern between different replicas (nodes, servers, ...), like the one below.

PBFT communication pattern (source: Miguel Castro, Barbara Liskov, et al. Practical Byzantine fault tolerance. 1999)

I have not been able to find anything for TeX, so before I resort to external image, is there a TeX/TikZ/etc solution?

  • Welcome to TeX.SX! You can use graphicx to include an external image. Alternatively, this would be quite easy to draw using either tikz or pstricks -- if you search on TeX.SX you can find many examples of how to use both of these packages. (Asking people to draw the image for you is not really a reasonable question to ask on TeX.SX, although you may get lucky!)
    – user30471
    Commented Oct 16, 2017 at 10:26
  • Thanks Andrew, I know how to include an image or use TikZ but I was looking for some tool or example of this (because if I try to do this from scratch with TikZ, it will probably take me many hours to get this one picture. Commented Oct 16, 2017 at 10:30

1 Answer 1


The code below, which produces the following diagram, should get you started:

enter image description here

The coordinates are from (0,4) in the top left-hand corner to (5,0) in the bottom right-hand corner (I have made the x-scale 2 to fit your column labels in).


  \foreach \row [count=\r] in {C,0,1,2,3} {
    \draw[thick](0,5-\r)node[left]{\row} -- ++(5,0);
  \foreach \col [count=\c] in {request,pre-prepare,prepare,commit,reply}{
      \draw[dotted] (\c,5)node[above left, anchor=east]{\col}--++(0,-5);
  \foreach \a/\b/\c/\d in {% arrow from (\a,\b) to (\a+\c,\b+\d)
      }{ \draw[blue,-{Stealth}] (\a,\b)--++(\c,\d); }


You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .