Annotation of OpenXM/doc/issac2000/ox-messages.tex, Revision 1.6
1.6 ! takayama 1: %%$OpenXM: OpenXM/doc/issac2000/ox-messages.tex,v 1.5 2000/01/15 03:46:27 noro Exp $
1.1 takayama 2:
1.4 ohara 3: \section{OX messages}
1.1 takayama 4:
5: An OX message for TCP/IP is a byte stream consisting of
6: a header and a body.
7: \begin{center}
8: \begin{tabular}{|c|c|}
9: \hline
10: Header & \hspace{10mm} Body \hspace{10mm} \\
11: \hline
12: \end{tabular}
13: \end{center}
14: The header consists of two signed 32 bit integers.
15: The first one is an OX tag
16: and the second one is a serial number of the OX message.
1.6 ! takayama 17: %Negative numbers are expressed by the two's complement.
1.1 takayama 18: Several byte orders including the network byte order
19: are allowed and the byte order is determined as a part of
1.5 noro 20: the establishment of a connection. See Section \ref{secsession} for details.
1.1 takayama 21:
1.4 ohara 22: The OX messages are classified into three types:
1.5 noro 23: DATA, COMMAND, and SPECIAL.
1.6 ! takayama 24: We have currently the following general tags for the OX messages.
1.1 takayama 25: \begin{verbatim}
26: #define OX_COMMAND 513 // COMMAND
27: #define OX_DATA 514 // DATA
1.5 noro 28: #define OX_SYNC_BALL 515 // SPECIAL
1.1 takayama 29: #define OX_DATA_WITH_LENGTH 521 // DATA
30: #define OX_DATA_OPENMATH_XML 523 // DATA
31: #define OX_DATA_OPENMATH_BINARY 524 // DATA
32: #define OX_DATA_MP 525 // DATA
33: \end{verbatim}
34:
35: New OX tags may be added.
36: The new tag should be classified into DATA or COMMAND.
1.6 ! takayama 37: For example, \verb+ OX_DATA_ASIR_LOCAL_BINARY + was added recently
1.2 takayama 38: to send internal serialized objects of asir via the OpenXM protocol.
1.4 ohara 39: This is a tag classified to DATA.
1.6 ! takayama 40: See the web page of OpenXM to add a new tag \cite{openxm-web}.
! 41: Any server is a stack machine (see Section~\ref{sec:ox-stackmachines}
1.5 noro 42: for detail).
1.6 ! takayama 43: {\it OX data} message sent by a client
! 44: are pushed onto the stack of a server.
! 45: If the server gets an {\it OX command} message, then the server
! 46: executes the command.
1.4 ohara 47:
48: For example, the asir command {\tt ox\_push\_cmo(P,1)}
1.5 noro 49: (push integer $1$ onto the server $P$)
1.1 takayama 50: sends an OX data message
1.4 ohara 51: {\tt (OX\_DATA,(CMO\_ZZ,1))} to the server $P$.
1.1 takayama 52: Here,
53: OX\_DATA stands for OX\_DATA header and
1.4 ohara 54: {\tt (CMO\_ZZ,1)} is a body standing for $1$ expressed
1.2 takayama 55: in the CMO data encoding format.
1.4 ohara 56: The server tranlates $(CMO\_ZZ, 1)$ to its own internal object fotrmat
1.5 noro 57: for integers and pushs the object onto the stack.
1.1 takayama 58:
1.5 noro 59: %An OpenXM client admit that its own command sends some OX messages
60: %sequentially at once.
61: %
62: %For example, the asir command
63: %{\tt ox\_execute\_string(P, "Print[x+y]")} sends an OX data message
64: %{\tt (OX\_DATA, (CMO\_STRING, "Print[x+y]"))} and an OX command message
65: %{\tt (OX\_COMMAND, (SM\_executeStringByLocalParser))} to an OpenXM
66: %server.
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>