GAP (scscp) - Chapter 1: Preface

Goto Chapter: Top 1 2 3 4 5 6 7 8 9 Bib Ind
[Top of Book] [Contents] [Previous Chapter] [Next Chapter]

[MathJax off]

1 Preface

### 1 Preface

The GAP package SCSCP implements the Symbolic Computation Software Composability protocol [FHK+b]. This protocol specifies an OpenMath-based remote procedure call framework, in which all messages (procedure calls and returns of results of successful computation or error messages) are encoded in OpenMath using content dictionaries scscp1 and scscp2 ([FHK+a], [FHK+c]). Using the SCSCP package, GAP can communicate locally or remotely with any other OpenMath-enabled SCSCP-compliant application which may be not only another computer algebra system but also another instance of the GAP system or even, for example, an external Java or C/C++ application via libraries http://java.symcomp.org/ or http://www.imcce.fr/Equipes/ASD/trip/scscp/ providing an SCSCP API. Such communication will go into seamless manner for the GAP user, since all conversions from GAP to OpenMath and vice versa will be performed in the background. See the SCIEnce project homepage http://www.symbolic-computing.org/ for the details about computer algebra systems and other sotware supporting SCSCP

The SCSCP package for GAP has two main components:

- SCSCP server;

- SCSCP client.

There are several ways to start GAP SCSCP server:

- call `RunSCSCPserver` (5.2-1) from the GAP session specifying the server name and the port number from the GAP session;

- start GAP as `gap myserver.g`, where `myserver.g` is the server configuration file with the last command being the call of `RunSCSCPserver` (5.2-1) (an example of such configuration file is given in `scscp/example/myserver.g` );

- start GAP as a daemon using the script `gapd.sh` which is supplied in the root directory of the package (for the description of all available options see comments in `gapd.sh`).

During startup the server installs all procedures that it will provide and loads their lookup mechanisms, and then begins to listen to the specified port. The recommended port number is 26133 which has been assigned to SCSCP by the Internet Assigned Numbers Authority (IANA) in November 2007, see http://www.iana.org/assignments/port-numbers.

When the server accepts a connection from client, it starts the "accept-evaluate-return" loop:

- accepts the `"procedure_call";` message;

- performs lookup of the appropriate GAP function;

- evaluates the result (or produces a side-effect);

- returns the result in the `"procedure_completed"` message or returns an error in the `"procedure_terminated"` message.

The server works in a "multi-user" mode. When one client is connected, the server is busy for other clients. As soon as the computation is finished and the client is disconnected, the server is waiting for the next connection, and normally it never stops until it will be terminated by the service provider. The server maintain a queue of five incoming connections (this parameter can be easily modified), and on each iteration evaluates the next request from the queue.

There is an SCSCP server accessible at `scscp.gap-system.org`, port 26133. It is running under development versions of the GAP system and a selection of currently distributed packages. The reader is encouraged to try to use examples from the manual to access this service, replacing `"localhost"` by its address, where appropriate. Please report to Alexander Konovalov if you will discover any bugs or if the server seems not available.

The SCSCP client:

- establishes connection with the specified server at the specified port;

- sends the `"procedure_call"` message to the server;

- waits for the result of the computation or returns to pick it up later;

- fetches the response, extracting the result from the `"procedure_completed"` message or entering the break loop in the case of the `"procedure_terminated"` message.

On the top of this functionality we built a set of instructions for simple parallel computations framework using the SCSCP protocol, which allows to send several procedure calls in parallel and then collect all results or pick up the first available result, and implements the master-worker skeleton. These tools are presented in the Chapter 8.

The package also implements a new kind of GAP input-output streams, namely input-output TCP streams (see Chapter 3), based on the functionality for TCP/IP protocol usage provided by the GAP package IO. Such streams may constitute an independent interest for adapting streams-using GAP code to use streams across the network.

Finally, the manual describes how the communication by SCSCP goes between several instances of the GAP system, but the same behaviour is expected from any SCSCP-compliant application: the set of supported OpenMath symbols clearly will be different, but the rules of communication are precisely specified in the SCSCP specification [FHK+b]. See the homepage of the SCIEnce project http://www.symbolic-computing.org/ for the information about SCSCP-compliant computer algebra systems and other tools developed in the project.

[Top of Book] [Contents] [Previous Chapter] [Next Chapter]
Goto Chapter: Top 1 2 3 4 5 6 7 8 9 Bib Ind

generated by GAPDoc2HTML