version 1.2, 2000/01/03 04:27:53 |
version 1.7, 2000/01/16 06:02:41 |
|
|
%%$OpenXM: OpenXM/doc/issac2000/ox-messages.tex,v 1.1 2000/01/02 07:32:12 takayama Exp $ |
%%$OpenXM: OpenXM/doc/issac2000/ox-messages.tex,v 1.6 2000/01/15 12:18:42 takayama Exp $ |
|
|
\section{OX messages} (Ohara) |
\section{OX messages} |
|
|
An OX message for TCP/IP is a byte stream consisting of |
An OX message for TCP/IP is a byte stream consisting of |
a header and a body. |
a header and a body. |
Line 14 Header & \hspace{10mm} Body \hspace{10mm} \\ |
|
Line 14 Header & \hspace{10mm} Body \hspace{10mm} \\ |
|
The header consists of two signed 32 bit integers. |
The header consists of two signed 32 bit integers. |
The first one is an OX tag |
The first one is an OX tag |
and the second one is a serial number of the OX message. |
and the second one is a serial number of the OX message. |
Negative numbers are expressed by the two's complement. |
%Negative numbers are expressed by the two's complement. |
Several byte orders including the network byte order |
Several byte orders including the network byte order |
are allowed and the byte order is determined as a part of |
are allowed and the byte order is determined as a part of |
the establishment of a connection. |
the establishment of a connection. See Section \ref{secsession} for details. |
|
|
The OX messages are classifed into three types: |
The OX messages are classified into three types: |
DATA, COMMAND, and others. |
DATA, COMMAND, and SPECIAL. |
We have the following main tags for the OX messages. |
We have currently the following general tags for the OX messages. |
\begin{verbatim} |
\begin{verbatim} |
#define OX_COMMAND 513 // COMMAND |
#define OX_COMMAND 513 // COMMAND |
#define OX_DATA 514 // DATA |
#define OX_DATA 514 // DATA |
#define OX_SYNC_BALL 515 // others |
#define OX_SYNC_BALL 515 // SPECIAL |
#define OX_DATA_WITH_LENGTH 521 // DATA |
#define OX_DATA_WITH_LENGTH 521 // DATA |
#define OX_DATA_OPENMATH_XML 523 // DATA |
#define OX_DATA_OPENMATH_XML 523 // DATA |
#define OX_DATA_OPENMATH_BINARY 524 // DATA |
#define OX_DATA_OPENMATH_BINARY 524 // DATA |
#define OX_DATA_MP 525 // DATA |
#define OX_DATA_MP 525 // DATA |
\end{verbatim} |
\end{verbatim} |
|
|
New OX tags may be added. |
A new OX tag may be added. |
The new tag should be classified into DATA or COMMAND. |
The new tag should be classified into DATA or COMMAND. |
For example, \verb+ OX_DATA_ASIR_LOCAL_BINARY + was added a few month ago |
For example, \verb+ OX_DATA_ASIR_LOCAL_BINARY + was added recently |
to send internal serialized objects of asir via the OpenXM protocol. |
to send internal serialized objects of Asir via the OpenXM protocol. |
This is a tag classifed to DATA. |
This is a tag classified to DATA. |
See the home page of OpenXM to add a new tag. |
See the web page of OpenXM to add a new tag \cite{openxm-web}. |
|
|
In OpenXM, a distributed computation is done as follows: |
%An OpenXM client admit that its own command sends some OX messages |
\begin{enumerate} |
%sequentially at once. |
\item A client requests something to a server. |
% |
\item The server does works according to the request. |
%For example, the asir command |
\item The client requests to send data to the server. |
%{\tt ox\_execute\_string(P, "Print[x+y]")} sends an OX data message |
\item The server sends the data to the client and the client gets the data. |
%{\tt (OX\_DATA, (CMO\_STRING, "Print[x+y]"))} and an OX command message |
\end{enumerate} |
%{\tt (OX\_COMMAND, (SM\_executeStringByLocalParser))} to an OpenXM |
The server is a stackmachine. |
%server. |
That is {\it OX data} message sent by the client |
|
are pushed to the stack of the server. |
|
If the server gets an {\it OX command} message, then the data are |
|
popped form the stack and they are used as arguments of a function call. |
|
For example, the asir command |
|
\verb+ ox_push_cmo(P,1) + (push integer $1$ to the server P) |
|
sends an OX data message |
|
(OX\_DATA,(CMO\_ZZ,1)) to the server $P$. |
|
Here, |
|
OX\_DATA stands for OX\_DATA header and |
|
(CMO\_ZZ,1) is a body standing for $1$ expressed |
|
in the CMO data encoding format. |
|
|
|
|
|
|
|
|
|
|
|