Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed Req/Rep protocol documentation #3217

Merged
merged 1 commit into from
Jun 16, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 10 additions & 5 deletions docs/network-spec/miniprotocols.tex
Original file line number Diff line number Diff line change
Expand Up @@ -310,6 +310,7 @@ \subsection{Request Response Protocol}
\renewcommand{\StDone}{\state{StDone}}
\newcommand{\Request}{\msg{MsgReq}}
\newcommand{\Response}{\msg{MsgResp}}
\newcommand{\RespDone}{\msg{MsgDone}}

\subsubsection{Description}
The request response protocol is polymorphic in the request and response data that is being transmitted.
Expand All @@ -328,10 +329,11 @@ \subsubsection{State machine}
\tikzstyle{every state}=[fill=red,draw=none,text=white]
\node[state, green, initial] (Idle) {\StIdle};
\node[state, blue, right of=Idle] (Busy) {\StBusy};
\node[state, right of=Busy] (Done) {\StDone};
\node[state, below of=Idle] (Done) {\StDone};

\draw (Idle) edge[] node{\Request} (Busy);
\draw (Busy) edge[] node{\Response} (Done);
\draw (Idle) edge[below, bend right] node{\Request} (Busy);
\draw (Busy) edge[above, bend right] node{\Response} (Idle);
\draw (Idle) edge[right] node{\RespDone} (Done);
\end{tikzpicture}
{\vskip 10pt}
The protocol uses the following messages.
Expand All @@ -340,13 +342,16 @@ \subsubsection{State machine}
The client sends a request to the server.
\item [\Response{} $(response)$]
The server replies with a response.
\item [\RespDone{} $(done)$]
Terminate the protocol.
\end{description}

\begin{tabular}{|l|l|l|l|} \hline
\multicolumn{4}{|c|}{Transition table} \\ \hline
from & message & parameters & to \\ \hline\hline
from & message & parameters & to \\ \hline\hline
\StIdle & \Request & $request$ & \StBusy \\ \hline
\StBusy & \Response & $response$ & \StDone \\ \hline
\StBusy & \Response & $response$ & \StIdle \\ \hline
\StIdle & \RespDone & & \StDone \\ \hline
\end{tabular}

\section{Handshake Mini Protocol}
Expand Down