[BACK]Return to control.tex CVS log [TXT][DIR] Up to [local] / OpenXM / doc / OpenXM-specs

Diff for /OpenXM/doc/OpenXM-specs/control.tex between version 1.2 and 1.8

version 1.2, 2000/01/23 00:41:08 version 1.8, 2000/11/30 02:41:36
Line 1 
Line 1 
 %% $OpenXM: OpenXM/doc/OpenXM-specs/control.tex,v 1.1.1.1 2000/01/20 08:52:46 noro Exp $  %% $OpenXM: OpenXM/doc/OpenXM-specs/control.tex,v 1.7 2000/11/17 02:50:04 takayama Exp $
 \section{Session Management}  \section{Session Management}
   
 \subsection{Control server}  \subsection{Control server}
Line 26  control servers.
Line 26  control servers.
 An OpenXM server has logically two I/O channels: one for exchanging  An OpenXM server has logically two I/O channels: one for exchanging
 data for computations and the other for controlling computations. The  data for computations and the other for controlling computations. The
 control channel is used to send commands to control execution on the  control channel is used to send commands to control execution on the
 server. The sample server ({\tt oxmain.c}) processes such control  nserver. The sample server ({\tt oxmain.c}) processes such control
 messages on another process. We call such a process a {\it  messages on another process. We call such a process a {\it
 control server}. In contrast, we call a server for computation an {\it  control server}. In contrast, we call a server for computation an {\it
 engine}. As the control server and the engine runs on the  engine}. As the control server and the engine runs on the
Line 36  OpenXM stack machine and it accepts {\tt SM\_control\_
Line 36  OpenXM stack machine and it accepts {\tt SM\_control\_
 to send signals to a server or to terminate a server.  to send signals to a server or to terminate a server.
 */  */
   
   \subsection{New OpenXM control servers}
   /*&jp
   OpenXM RFC 101 Draft を見よ
   \htmladdnormallink{http://www.math.kobe-u.ac.jp/OpenXM/OpenXM-RFC.html}{http://www.math.kobe-u.ac.jp/OpenXM/OpenXM-RFC.html}.
   */
   /*&eg
   See OpenXM RFC 101 Draft.
   \htmladdnormallink{http://www.math.kobe-u.ac.jp/OpenXM/OpenXM-RFC.html}{http://www.math.kobe-u.ac.jp/OpenXM/OpenXM-RFC.html}.
   */
   
 \subsection{OpenXM reset protocol}  \subsection{OpenXM reset protocol}
   
 /*&jp  /*&jp
Line 126  the engine returns to the usual state.
Line 136  the engine returns to the usual state.
 \end{enumerate}  \end{enumerate}
 */  */
   
 \begin{figure}[htbp]  
 \epsfxsize=17cm  
 \epsffile{reset.eps}  
 \caption{OpenXM reset procedure}  
 \label{reset}  
 \end{figure}  
   
 /*&eg  /*&eg
 Figure \ref{reset} illustrates the flow of data.  Figure \ref{reset} illustrates the flow of data.
 {\tt OX\_SYNC\_BALL} is a special OX message and  {\tt OX\_SYNC\_BALL} is a special OX message and
Line 149  I/O stream に残るデータの終りを示す. 
Line 152  I/O stream に残るデータの終りを示す. 
 後に続くクライアントからのリクエストと, エンジンからの返答が  後に続くクライアントからのリクエストと, エンジンからの返答が
 正しく対応する.  正しく対応する.
 */  */
   \begin{figure}[htbp]
   \epsfxsize=10cm
   \begin{center}
   \epsffile{reset.eps}
   \end{center}
   \caption{OpenXM reset procedure}
   \label{reset}
   \end{figure}
   
 \subsection{Control message (SMObject/TCPIP/Control)}  \subsection{Control message (SMObject/TCPIP/Control)}
   
 \begin{enumerate}  \begin{enumerate}
Line 195  Request:
Line 207  Request:
 \begin{tabular}{|c|c|}  \hline  \begin{tabular}{|c|c|}  \hline
 {\tt int32 OX\_COMMAND} & {\tt int32 SM\_control\_kill}  \\  {\tt int32 OX\_COMMAND} & {\tt int32 SM\_control\_kill}  \\
 \hline  \hline
 \end{tabular}  \end{tabular}\\
 Result: none.  Result: none.
 \end{enumerate}  \end{enumerate}
   
Line 224  Result: none.
Line 236  Result: none.
 0   0   2   03   (OX_SYNC_BALL)  0   0   2   03   (OX_SYNC_BALL)
 \end{verbatim}  \end{verbatim}
   
   \subsection{Notification from servers}
   
   /*&jp
   OpenXM サーバは, 可能であるかぎり寡黙である.
   たとえばエラーをおこしても, エラーはサーバのエンジンスタックにつまれる
   だけであり, サーバはクライアントが {\tt pop\_cmo} メッセージをおくらない
   かぎり何も送信しない.
   */
   /*&eg
   OpenXM servers try to be quiet as far as possible.
   For example, engine errors of a server are only put on the engine stack and
   the engine does not send error packets unless the client sends the message
   {\tt pop\_cmo}.
   */
   
   /*&jp
   OpenXM はこの原則をやぶる例外的な方法を一つ用意している.
   コントロールサーバは,
   {\tt OX\_NOTIFY} ヘッダおよびそれにつづく {\tt OX\_DATA} パケットを送る
   ことができる.
   この機能は mathcap で禁止することも可能である.
   */
   /*&eg
   OpenXM provides a method to break this principle.
   Control server may send {\tt OX\_NOTIFY} header and an {\tt OX\_DATA} packet.
   This transmission can be prohibited by mathcap.
   */
   
   /*&jp
   この機能をどのように使うか例をあげて説明しよう.
   {\tt Asir} の {\tt ox\_plot} サーバは, quit ボタンをもっている.
   quit ボタンがおされると canvas が消滅するが, エンジン自体は存在を
   つづける.  この状態で描画命令がくると,
   エンジンスタックに, ``canvas does not exist'' というエラーがつまれる.
   エンジンがこのエラーが生じたことを緊急に知らせたいときに
   {\tt OX\_NOTIFY} を用いる.
   */
   /*&eg
   Let us explain how to use {\tt OX\_NOTIFY}.
   The {\tt ox\_plot} server of {\tt asir} has a quit button.
   If the quit button is pressed, the canvas dissappears, but the engine
   does not terminate.
   If the client sends drawing messages without the canvas,
   then the engine pushes
   error packets ``canvas does not exist'' on the engine stack.
   If the engine wants to notify the error to the client immediately,
   the {\tt OX\_NOTIFY} message should be used.
   */
   
   /*&jp
   ここで, {\tt OX\_NOTIFY} をおくるのは, コントロールプロセスで
   あることに注意しよう.
   したがってエンジンはなんらかの方法で, コントロールサーバに
   {\tt OX\_NOTIFY} をおくることを依頼しないといけない.
   OpenXM の規格では,
   ファイル {\tt /tmp/.ox\_notify.pid} に touch することでこれの
   一つの実現方法を与えている.
   ここで {\tt pid} はエンジンのプロセス番号である.
   コントロールサーバはファイル {\tt /tmp/.ox\_notify.pid} が
   touch されたことを検出したら, クライアントに
   {\tt OX\_NOTIFY} パケットおよび {\tt OX\_DATA} で {\tt cmo\_null} を送る.
   エンジンはファイルを用いてコントロールサーバに急を知らせる以外に,
   共有メモリやシグナルを用いてしらせてもよい.
   */
   /*&eg
   Let us note that it is the control process that sends {\tt OX\_NOTIFY}.
   Therefore, the engine must ask the control server to send
   {\tt OX\_NOTIFY}.
   In the OpenXM, if the engine touches the file
   {\tt /tmp/.ox\_notify.pid}, then the control server sends
   the {\tt OX\_NOTIFY} header and the {\tt OX\_DATA} packet
   of {\tt cmo\_null}.
   Here, {\tt pid} is the process id of the engine.
   Engines and control processes may use a shared memory or a signal
   instead of the file {\tt /tmp.ox\_notify.pid}.
   */

Legend:
Removed from v.1.2  
changed lines
  Added in v.1.8

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