| version 1.8, 2000/01/16 03:15:49 |
version 1.10, 2000/01/17 01:24:27 |
|
|
| % $OpenXM: OpenXM/doc/issac2000/session-management.tex,v 1.7 2000/01/15 03:46:27 noro Exp $ |
% $OpenXM: OpenXM/doc/issac2000/session-management.tex,v 1.9 2000/01/16 06:39:39 takayama Exp $ |
| |
|
| \section{Session Management} |
\section{Session Management} |
| \label{secsession} |
\label{secsession} |
| Line 11 OpenXM. We assume that various clients and servers |
|
| Line 11 OpenXM. We assume that various clients and servers |
|
| establish connections dynamically and communicate to each |
establish connections dynamically and communicate to each |
| other. Therefore it is necessary to give a dynamical and unified |
other. Therefore it is necessary to give a dynamical and unified |
| method to start servers and to establish connections. |
method to start servers and to establish connections. |
| In addition to that, interruption of an exections and debugging |
In addition to that, interruption of executions and |
| supports are necessary for intaractive distributed computation. |
debugging facilities |
| |
are necessary for interactive distributed computation. |
| |
|
| %\subsection{Interface of servers} |
%\subsection{Interface of servers} |
| % |
% |
| Line 42 When the launcher is invoked, the client |
|
| Line 43 When the launcher is invoked, the client |
|
| informs the launcher of a port number for TCP/IP connection |
informs the launcher of a port number for TCP/IP connection |
| and the name of a server. |
and the name of a server. |
| \item The launcher and the client establish a connection with the |
\item The launcher and the client establish a connection with the |
| specified port number. |
specified port number. One time password may be used to prevent |
| |
launcher spoofing. |
| \item The launcher creates a process and executes the server after |
\item The launcher creates a process and executes the server after |
| setting the data channel appropriately. |
setting the data channel appropriately. |
| \end{enumerate} |
\end{enumerate} |
| |
|
| After finishing the above task as a launcher, the launcher process |
After finishing the above task as a launcher, the launcher process |
| acts as a control server and controls the server process created by |
acts as a control server and controls the server process created by |
| itself. As for a control server see Section \ref{control}. |
itself. As to the control server see Section \ref{control}. |
| |
|
| As the data channel is used to exchange binary data, |
As the data channel is used to exchange binary data, |
| the byte order conversion is necessary when a |
the byte order conversion is necessary when a |
| Line 85 to send signals to a server or to terminate a server. |
|
| Line 87 to send signals to a server or to terminate a server. |
|
| |
|
| 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 without care for remaining data in |
which may cause troubles. |
| the buffers. To reset a server safely the following are required. |
To reset a server safely the following are required. |
| |
|
| \begin{enumerate} |
\begin{enumerate} |
| \item A sending of an {\tt OX} message must be completed. |
\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 {\tt OX} message is sent as a combination of several {\tt CMO} |
| data, a global exit without sending all the data confuses the |
data, a global exit without sending all may generate broken data. |
| subsequent communication. |
|
| |
|
| \item After restarting a server, a request from a client |
\item After restarting a server, a request from a client |
| must correctly corresponds to the response from the server. |
must correctly corresponds to the response from the server. |
| Line 103 after restarting a server. |
|
| Line 104 after restarting a server. |
|
| \end{enumerate} |
\end{enumerate} |
| |
|
| {\tt SM\_control\_reset\_connection} is an {\tt SM} command to |
{\tt SM\_control\_reset\_connection} is an {\tt SM} command to |
| initiate a safe resetting of a server. We show the action of |
initiate a safe resetting of a server. |
| a server and a client from the initiation to the completion of |
Under the OpenXM reset protocol a server and a client act as follows. |
| a resetting. |
|
| |
|
| \centerline{\fbox{client}} |
\centerline{\fbox{client}} |
| |
|
| Line 142 any special action to be executed by the server becaus |
|
| Line 142 any special action to be executed by the server becaus |
|
| assured that the peer is in the resetting state when one has received |
assured that the peer is in the resetting state when one has received |
| {\tt OX\_SYNC\_BALL}. |
{\tt OX\_SYNC\_BALL}. |
| |
|
| \subsection{Debugging supports} |
\subsection{Debugging facilities} |
| Debugging is not easy for distributed computations. |
Debugging is not easy for distributed computations. |
| If servers are executed on X window system, then the control server can |
We provide two methods to help debugging. |
| attach an {\tt xterm} to the standard outputs of the engine to display |
If servers are executed on X window system, |
| diagnostic messages from the engine. |
the diagnostic messages from the engine are displayed in a {\tt xterm} |
| |
window. |
| Furthermore, if the engine provides an interface to input commands, |
Furthermore, if the engine provides an interface to input commands, |
| then debugging of user defined programs will be |
then each engine can pop up a debug window. |
| possible on the engine. 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 {\tt 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} |