Annotation of OpenXM/doc/issac2000/ox-messages.tex, Revision 1.4
1.4 ! ohara 1: %%$OpenXM: OpenXM/doc/issac2000/ox-messages.tex,v 1.3 2000/01/11 05:35:48 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.
17: Negative numbers are expressed by the two's complement.
18: Several byte orders including the network byte order
19: are allowed and the byte order is determined as a part of
1.3 noro 20: the establishment of a connection. See Section \ref{secsession}.
1.1 takayama 21:
1.4 ! ohara 22: The OX messages are classified into three types:
1.1 takayama 23: DATA, COMMAND, and others.
24: We have the following main tags for the OX messages.
25: \begin{verbatim}
26: #define OX_COMMAND 513 // COMMAND
27: #define OX_DATA 514 // DATA
28: #define OX_SYNC_BALL 515 // others
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.2 takayama 37: For example, \verb+ OX_DATA_ASIR_LOCAL_BINARY + was added a few month ago
38: to send internal serialized objects of asir via the OpenXM protocol.
1.4 ! ohara 39: This is a tag classified to DATA.
! 40: See the web page of OpenXM to add a new tag.
1.1 takayama 41:
42: In OpenXM, a distributed computation is done as follows:
43: \begin{enumerate}
44: \item A client requests something to a server.
1.3 noro 45: \item The server does some work according to the request.
1.1 takayama 46: \item The client requests to send data to the server.
47: \item The server sends the data to the client and the client gets the data.
48: \end{enumerate}
1.4 ! ohara 49: The server is a stack machine. (see Section~\ref{sec:ox-stackmachines}
! 50: for detail)
1.2 takayama 51: That is {\it OX data} message sent by the client
1.1 takayama 52: are pushed to the stack of the server.
1.4 ! ohara 53: If the server gets an {\it OX command} message, then the server extract
! 54: a stack machine code in the OX command message and interpret the code.
! 55: For example, in case of SM\_executeFunction, some data are popped from
! 56: the stack and they are used as arguments of a function call.
! 57:
! 58: We explain an implementation of handling OX messages.
! 59: For example, the asir command {\tt ox\_push\_cmo(P,1)}
! 60: (push integer $1$ to the server $P$)
1.1 takayama 61: sends an OX data message
1.4 ! ohara 62: {\tt (OX\_DATA,(CMO\_ZZ,1))} to the server $P$.
1.1 takayama 63: Here,
64: OX\_DATA stands for OX\_DATA header and
1.4 ! ohara 65: {\tt (CMO\_ZZ,1)} is a body standing for $1$ expressed
1.2 takayama 66: in the CMO data encoding format.
1.4 ! ohara 67: The server tranlates $(CMO\_ZZ, 1)$ to its own internal object fotrmat
! 68: for integers and pushs the object to the stack.
1.1 takayama 69:
1.4 ! ohara 70: An OpenXM client admit that its own command sends some OX messages
! 71: sequentially at once.
1.1 takayama 72:
1.4 ! ohara 73: For example, the asir command
! 74: {\tt ox\_execute\_string(P, "Print[x+y]")} sends an OX data message
! 75: {\tt (OX\_DATA, (CMO\_STRING, "Print[x+y]"))} and an OX command message
! 76: {\tt (OX\_COMMAND, (SM\_executeStringByLocalParser))} to an OpenXM
! 77: server.
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>