メインコンテンツまでスキップ

データ再構成サービスの概要

データ再構成サービスの構成要素​

データ再構成サービス (DRS) の実装には、接続プロトコルのモジュール、サービスに対して行いうる各種要求を処理するハンドラ、それらの要求に応じて動作するコンパイラおよび/またはインタプリタ (フォームマシン / Form Machine と呼ばれる)、そしてデータ再構成の定義 (フォーム / form) を保存・取得するためのファイルストレージモジュールが含まれます。

本節では接続プロトコルと要求を説明します。次節ではフォームマシンの言語をかなり詳しく扱います。ファイルストレージについては、サービスの利用に対して透過的であり、その実装は DRS ホストごとに異なるため、本文書では説明しません。

概念的なネットワーク接続​

DRS には 3 つの概念的なネットワーク接続があります。図 1 を参照してください。

  1. 制御接続 (CC) は、起点ユーザと DRS との間の接続です。データ再構成を指定するフォームはこの接続を通じて定義されます。ユーザは、後述の 2 つの接続上を流れるデータに適用するフォームを (一度) 指定します。
  2. ユーザ接続 (UC) は、ユーザプロセスと DRS との間の接続です。
  3. サーバ接続 (SC) は、DRS とサービスを提供するプロセスとの間の接続です。

目標はネットワークをユーザプロセスとサーバプロセスに適応させることなので、UC と SC には最小限の要件しか課しません。

      +------------+              +------+          +---------+
| ORIGINATING| CC | DRS | SC | SERVER |
| USER |--------------| |----------| PROCESS |
+------------+ ^ +------+ ^ +---------+
| / |
| UC/ <-----\ |
| / \ |
| +-----------+ \|
TELNET ---------+ | USER | +-- Simplex or Duplex
Protocol | PROCESS | Connections
Connection +-----------+

Figure 1. DRS Network Connections

接続プロトコルとメッセージ形式​

制御接続上では、対話は起点ユーザと DRS の間で直接行われます。ここでユーザはフォームを定義したり、定義済みのフォームを接続に割り当てて再フォーマットさせたりします。

ユーザは標準の初期接続プロトコル (ICP) を通じて DRS に接続します。ロガー (logger) を経由するのではなく、DRS が常時 (alway) リッスンしている特定のソケットを呼び出します。(実験用のソケット番号は後日公表されます。) DRS はユーザを別のソケットペアに切り替えます。

制御接続上で送信されるメッセージは、TELNET 向けに規定された型と形式に従います。(データ型コードは ASCII —— デフォルト —— を指定すべきです。) したがって、端末のユーザは、図 2 に示すように、自分のローカル TELNET を通じて DRS に接続できるはずです。

                        +---------+   CC  +---------+
+---------| TELNET |-------| DRS |
| +---------+ +---------+
+-----------------------+
| USER |
| (TERMINAL OR PROGRAM) |
+-----------------------+

Figure 2. A TELNET Connection to DRS

ユーザは DRS に接続する際、自分のフォーム名の一意性を保証する限定子として 6 文字のユーザ ID (UID) を提示します。ユーザは当初、次のコマンドを持つことになります。

      1.  DEFFORM (form)
2. ENDFORM (form)

These two commands define a form, the text of which is
chronologically entered between them. The form is stored
in the DRS local file system.

3. PURGE (form)

The named form, as qualified by the current UID, is purged
from the DRS file system.

4. LISTNAMES (UID)

The unqualified names of all forms assigned to UID are
returned.

5. LISTFORM (form)

The source text of a named form is returned.

6. DUPLEXCONNECT (user site, user receive socket, user method,
server site, server receive socket, server method, user-
to-server form name, server-to-user form name)

A duplex connection is made between two processes using the
receive sockets and the sockets one greater. Method is
defined below. The forms define the transformations on
these connections.

7. SIMPLEXCONNECT (user site, user socket, user method, server
site, server socket, server method, form)

A simplex connection is made between the two sockets as
specified by method.

8. ABORT (site, receive socket)

The reconfiguration of data is terminated by closing both
the UC and SC specified in part in the command.

6 または 7 で指定される二者のうち、一方、両方、またはどちらもが、要求を発行する側と同じホスト上にあっても構いません。site と socket が、その接続のユーザ側とサーバ側を指定します。method は接続の確立方法を示します。

これらのコマンドには次の規則が適用されます。

      1)  Commands may be abbreviated to the minimum number of
characters to identify them uniquely.

2) All commands should be at the start of a line.

3) Parameters are enclosed in parentheses and separated by
commas.

4) Imbedded blanks are ignored.

5) The parameters are:

form name 1-6 characters
UID 1-6 characters
Site 1-2 characters specifying
the hexadecimal host number
Socket 1-8 characters specifying the
hexadecimal socket number
Method A single character

6) Method has the following values:

C The site/socket is already connected
to the DRS as a dummy control connection
(should not be the real control connection).
I Connect via the standard ICP (does not
apply to SIMPLEXCONNECT).
D Connect directly via STR, RTS.

The DRS will make at least the following minimal
responses to the user:

1) A positive or negative acknowledgement after
each line (CR/LF)
2) If a form fails or terminates
TERMINATE, ASCII Host # as hex, ASCII Socket # as hex,
ASCII Return Code as decimal
thus identifying at least one end of the connection.

接続構成の例​

DRS の動作モードには基本的に 2 つあります。1) ユーザがプログラム間に DRS の UC/SC 接続を確立したい場合。2) ユーザが同じ接続を確立したいが、自分 (自分の端末) が UC または SC の末端にいる場合です。後者は、ユーザが自分の端末からサーバプロセス (例えばロガー) と対話したい場合に適しています。

最初のケース (図 1、起点ユーザは端末でもプログラムでもよい) では、ユーザは適切な CONNECT コマンドを発行します。UC/SC は単工でも双工でも構いません。

2 番目のケースには 2 通りの可能な構成があり、図 3 と図 4 に示します。

  +-------+    +--------+   CC    +-----+        +----+
| |----| |---------| | SC | |
| USER | | TELNET | UC | DRS |--------| SP |
| |----| |---------| | | |
+-------+ +--------+ +-----+ +----+

Figure 3. Use of Dummy Control Connection
              +---------+
+------+ /| USER | CC +-----+
| |---/ | SIDE |--------| | SC +----+
| USER | +---------+ UC | DRS |--------| SP |
| |---\ | SERVING |--------| | +----+
+------+ \| SIDE | +-----+
+---------+

Figure 4. Use of Server TELNET

図 3 では、ユーザは自分の TELNET に DRS への双工接続を 2 本確立させます。1 本は制御情報 (CC) 用で、もう 1 本はダミーです。CONNECT を発行する際、ユーザは「既に接続済み」(already connected) オプションを使ってこのダミー双工接続 (UC) を参照します。

図 4 では、ユーザの TELNET (ユーザ側) が DRS を呼び出します。CONNECT が発行されると、DRS が TELNET (サーバ側) を呼び出し、これがコンソールに代わって呼び出しを受け入れます。この違いはユーザにしか分かりません。DRS から見れば、図 4 の構成は図 1 と同一に見えるからです。2 点に注意が必要です:

  1. TELNET プロトコルが必要なのは、フォームの定義と接続の指示のためだけです。利用側プロセスと提供側プロセスには必要ありません。
  2. 利用側プロセスと提供側プロセスがネットワーク利用のために必要な変更は最小限、すなわち NCP インタフェースだけです。