[Glue!] Protocol Specification, ASCII Version 0


Overall Structure

This protocol is based ASCII text string. All transaction consists of only one line, i.e. the datagram contains only one newline character, at the very end.

The datagram consists of some parts, separated by octal 034 characters. Each part contains one operation specification.


Structure of Operations

Each operation has one of following formats:
NameToBeAssigned=Value
NameToBeRefered?
NameToBeTested:ExpectedValue
!OperationMnemonic

The first form is used when a client assignes new value to a name. The second is used when a client needs the current value of a name. The third is used to specifying the update condition, before the assignment specification having the first form, in the case of mutual access control. The last is for operations other than accessing value, such as control requests. In the last case, some parameters may follow the mnemonic, separated by space character.


Value Representation

The values are represented as follows:
#Integer
$FloatingPoint
"CharacterString
@Link
%Expression
UNBOUND
Data type is shown by the first character. The value itself is shown by following characters, using conventional ASCII notation.

This type of data is bound to following attributes:
'Value 'Control 'IfTriggered

Other attributes hold ordinary character strings, with no type indicator.


Name Representation

Name is an arbitrary length sequence of identifiers, separated by period. The identifier is an arbitrary length sequence of alphanumeric characters. And only the first character of the name should be alphabetic character.

The names form the hierarchical structure within the name space. Some operations are prepared to access this structure.

The attribute of the name is represented by postfixing the attribute identifier, separated by apostrophe character.

Predefined Names

Some names listed below are reserved for system control purposes.

Operations

Following operations are defined in this version:
InitiateChannel Hostname:Portnumber ClientId
Channel opening control message. This operation requires additional two parameter. The first is the Hostname:Portnumber of the client port prepared for the message channel connection. The second is the symbolic name of the client, which is refered by transaction made later. These two may be identical, but there should be.
DisconnectChannel
Channel closing control message. No parameters.
TerminateServerOperation
Terminates the server itself. No parameters.

AddInformTo Name Client
Adds a client to information destination list. Requires two parameters; name and client.
DelInformTo Name Client
Deletes a client from information destination list. Requires two parameters; name and client.
AddTriggers Source Destination
Adds a name (Destination) which is triggered when a value of a name (Source) is changed.
DelTriggers Source Destination
Deletes a name from the dependency list.
AddCondition Name Expr TriggeredBy ...
Defines Expr to be evaluated when a Name is triggered, and the list which shows the names which trigger the Name.
DelCondition Name
Undefines expression to be evaluated when being triggered, and deletes all trigger source

QueryFullName
Returns a list of all names defined in the database. No parameter.
QueryRootName
Returns a list of the first identifier of the names defined in the database. No parameter.
QueryVariant Stem
Returns a list of the identifiers which follow the given Stem.
QueryExistence Name
Returns the given Name if the name is defined in the database, returns '' otherwise.
QueryAttribute Name
Returns a list of attributes defined for the given Name.

SaveContents SnapshotId
Saves the snapshot information which is enough to restart the server with identical contents. This operation requires additional parameter.
LoadContents SnapshotId
Load the snapshot information and restart server operation. This operation requires additional parameter.

 [M.T. HomePage]  [written & copyrighted by Masayuki Takata]