[BACK]Return to session-management.tex CVS log [TXT][DIR] Up to [local] / OpenXM / doc / issac2000

Diff for /OpenXM/doc/issac2000/session-management.tex between version 1.10 and 1.12

version 1.10, 2000/01/17 01:24:27 version 1.12, 2000/01/17 07:15:52
Line 1 
Line 1 
 % $OpenXM: OpenXM/doc/issac2000/session-management.tex,v 1.9 2000/01/16 06:39:39 takayama Exp $  % $OpenXM: OpenXM/doc/issac2000/session-management.tex,v 1.11 2000/01/17 06:10:41 noro Exp $
   
 \section{Session Management}  \section{Session Management}
 \label{secsession}  \label{secsession}
Line 83  send a signal from the control server. A control serve
Line 83  send a signal from the control server. A control serve
 OpenXM stack machine and it accepts {\tt SM\_control\_*} commands  OpenXM stack machine and it accepts {\tt SM\_control\_*} commands
 to send signals to a server or to terminate a server.  to send signals to a server or to terminate a server.
   
 \subsection{Resetting a server}  \subsection{Resetting an engine}
   
 A client can send a signal to an engine by using the control channel  A client can send a signal to an engine by using the control channel
 at any time. However, I/O operations are usually buffered,  at any time. However, I/O operations are usually buffered,
 which may cause troubles.  which may cause troubles.
 To reset a server safely the following are required.  To reset an engine safely the following are required.
   
 \begin{enumerate}  \begin{enumerate}
 \item Any OX message must be a synchronized object in the sense of Java.  \item Any OX message must be a synchronized object in the sense of Java.
   
 As an {\tt OX} message is sent as a combination of several {\tt CMO}  As an OX message is sent as a combination of several {\tt CMO}
 data, a global exit without sending all may generate broken data.  data, a global exit without sending all may generate broken data.
   
 \item After restarting a server, a request from a client  \item After restarting an engine, a request from a client
 must correctly corresponds to the response from the server.  must correctly corresponds to the response from the engine.
   
 An incorrect correspondence occurs if some data remain on the stream  An incorrect correspondence occurs if some data remain on the stream
 after restarting a server.  after restarting an engine.
 \end{enumerate}  \end{enumerate}
   
 {\tt SM\_control\_reset\_connection} is an {\tt SM} command to  {\tt SM\_control\_reset\_connection} is a stack machine command to
 initiate a safe resetting of a server.  initiate a safe resetting of an engine.
 Under the OpenXM reset protocol a server and a client act as follows.  The control server sends {\tt SIGUSR1} to the engine if it receives
   {\tt SM\_control\_reset\_connection} from the client.
   Under the OpenXM reset protocol an engine and a client act as follows.
   
 \centerline{\fbox{client}}  \vskip 2mm
   \noindent
   {\it Client side}
 \begin{enumerate}  \begin{enumerate}
 \item The client sends {\tt SM\_control\_reset\_connection} to the  \item After sending {\tt SM\_control\_reset\_connection} to the
 control server. The control server sends {\tt SIGUSR1} to the engine.  control server, the client enters the resetting state. It skips all {\tt
 \item The client enters the resetting state. It skips all {\tt  
 OX} messages from the engine until it receives {\tt OX\_SYNC\_BALL}.  OX} messages from the engine until it receives {\tt OX\_SYNC\_BALL}.
 \item After receiving {\tt OX\_SYNC\_BALL} the client sends  \item After receiving {\tt OX\_SYNC\_BALL} the client sends
 {\tt OX\_SYNC\_BALL} to the engine and returns to the usual state.  {\tt OX\_SYNC\_BALL} to the engine and returns to the usual state.
 \end{enumerate}  \end{enumerate}
   
 \centerline{\fbox{engine}}  \noindent
   {\it Engine side}
 \begin{enumerate}  \begin{enumerate}
 \item After receiving {\tt SIGUSR1} from the control server,  \item
   After receiving {\tt SIGUSR1} from the control server,
 the engine enters the resetting state.  the engine enters the resetting state.
 \item The engine sends {\tt OX\_SYNC\_BALL} to the client.  The engine sends {\tt OX\_SYNC\_BALL} to the client.
 We note that the operation does not block because  The operation does not block because
 the client reads and skips {\tt OX} messages soon after sending  the client is now in the resetting state.
 {\tt SM\_control\_reset\_connection}.  \item The engine skips all OX messages from the engine until it
 \item The engine skips all {\tt OX} messages from the engine until it  receives {\tt OX\_SYNC\_BALL}. After receiving {\tt OX\_SYNC\_BALL}
 receives {\tt OX\_SYNC\_BALL}.  the engine returns to the usual state.
 \item After receiving {\tt OX\_SYNC\_BALL} the engine returns to the  
 usual state.  
 \end{enumerate}  \end{enumerate}
   
   \begin{figure}[htbp]
   \epsfxsize=8.5cm
   \epsffile{reset.eps}
   \caption{OpenXM reset procedure}
   \label{reset}
   \end{figure}
   
   Figure \ref{reset} illustrates the flow of data.
 {\tt OX\_SYNC\_BALL} is used to mark the end of data remaining in the  {\tt OX\_SYNC\_BALL} is used to mark the end of data remaining in the
 I/O streams. After reading it, it is assured that each stream is empty  I/O streams. After reading it, it is assured that each stream is empty
 and that the subsequent request from a client correctly  and that the subsequent request from a client correctly
 corresponds to the response from the server.  corresponds to the response from the engine.
 We note that we don't have to associate {\tt OX\_SYNC\_BALL} with  We note that we don't have to associate {\tt OX\_SYNC\_BALL} with
 any special action to be executed by the server because it is  any special action to be executed by the engine because it is
 assured that the peer is in the resetting state when one has received  assured that the engine is in the resetting state when it has received
 {\tt OX\_SYNC\_BALL}.  {\tt OX\_SYNC\_BALL}.
   
 \subsection{Debugging facilities}  \subsection{Debugging facilities}
 Debugging is not easy for distributed computations.  Debugging is sometimes very hard for distributed computations.
 We provide two methods to help debugging.  We provide two methods to help debugging on X window system:
 If servers are executed on X window system,  1. the diagnostic messages from the engine are displayed in a {\tt xterm}
 the diagnostic messages from the engine are displayed in a {\tt xterm}  window;
 window.  2. the engine can pop up a window to input debug commands.
 Furthermore, if the engine provides an interface to input commands,  
 then each engine can pop up a debug window.  
 For example {\tt ox\_asir}, which is  For example {\tt ox\_asir}, which is
 the OpenXM server of {\tt Risa/Asir}, can pop up a window to input  the OpenXM server of Risa/Asir, can pop up a window to input
 debug commands and the debugging similar to that on usual terminals is possible.  debug commands and the debugging similar to that on usual terminals is possible.
 One can also send {\tt SIGINT} by using {\tt SM\_control\_to\_debug\_mode}  One can also send {\tt SIGINT} by using {\tt SM\_control\_to\_debug\_mode}
 and it provides a similar functionality to entering the debugging  and it provides a similar functionality to entering the debugging

Legend:
Removed from v.1.10  
changed lines
  Added in v.1.12

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>