  
  [1X1 Preface[0X
  
  The   [5XGAP[0m   package  [5XSCSCP[0m  implements  the  Symbolic  Computation  Software
  Composability  protocol [FHKLLRb]. This protocol specifies an [5XOpenMath[0m-based
  remote  procedure call framework, in which all messages (procedure calls and
  returns  of results of successful computation or error messages) are encoded
  in  [5XOpenMath[0m  using  content  dictionaries  [5Xscscp1[0m  and  [5Xscscp2[0m  ([FHKLLRa],
  [FHKLR]).  Using  the [5XSCSCP[0m package, [5XGAP[0m can communicate locally or remotely
  with any other [5XOpenMath[0m-enabled [5XSCSCP[0m-compliant application which may be not
  only  another  computer  algebra system but also another instance of the [5XGAP[0m
  system  or  even,  for  example,  an  external Java or C/C++ application via
  libraries                     [7Xhttp://java.symcomp.org/[0m                    or
  [7Xhttp://www.imcce.fr/Equipes/ASD/trip/scscp/[0m  providing  an  [5XSCSCP[0m  API. Such
  communication  will  go  into  seamless  manner  for the [5XGAP[0m user, since all
  conversions  from  [5XGAP[0m  to  [5XOpenMath[0m and vice versa will be performed in the
  background.        See        the       SCIEnce       project       homepage
  [7Xhttp://www.symbolic-computation.org/[0m  for the details about computer algebra
  systems and other sotware supporting [5XSCSCP[0m
  
  The [5XSCSCP[0m package for [5XGAP[0m has two main components:
  
  --    SCSCP server;
  
  --    SCSCP client.
  
  There are several ways to start [5XGAP[0m [5XSCSCP[0m server:
  
  --    call [2XRunSCSCPserver[0m ([14X5.2-1[0m) from the [5XGAP[0m session specifying the server
        name and the port number from the [5XGAP[0m session;
  
  --    start   [5XGAP[0m   as  [10Xgap  myserver.g[0m,  where  [11Xmyserver.g[0m  is  the  server
        configuration   file   with   the  last  command  being  the  call  of
        [2XRunSCSCPserver[0m ([14X5.2-1[0m) (an example of such configuration file is given
        in [11Xscscp/example/myserver.g[0m );
  
  --    start  [5XGAP[0m  as  a daemon using the script [11Xgapd.sh[0m which is supplied in
        the  root  directory  of  the  package  (for  the  description  of all
        available options see comments in [11Xgapd.sh[0m).
  
  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
  [7Xhttp://www.iana.org/assignments/port-numbers[0m.
  
  When   the   server   accepts  a  connection  from  client,  it  starts  the
  "accept-evaluate-return" loop:
  
  --    accepts the [10X"procedure_call";[0m message;
  
  --    performs lookup of the appropriate GAP function;
  
  --    evaluates the result (or produces a side-effect);
  
  --    returns  the result in the [10X"procedure_completed"[0m message or returns an
        error in the [10X"procedure_terminated"[0m 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 [5XSCSCP[0m server accessible at [11Xchrystal.mcs.st-andrews.ac.uk[0m, port
  26133.  It  is  running  under  development versions of the [5XGAP[0m 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
  [11X"localhost"[0m  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 [10X"procedure_call"[0m 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
        [10X"procedure_completed"[0m  message  or entering the break loop in the case
        of the [10X"procedure_terminated"[0m message.
  
  On  the  top of this functionality we built a set of instructions for simple
  parallel  computations  framework  using the [5XSCSCP[0m 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 [14X8[0m.
  
  The  package  also implements a new kind of [5XGAP[0m input-output streams, namely
  input-output  TCP  streams  (see  Chapter [14X3[0m), based on the functionality for
  TCP/IP  protocol  usage  provided  by  the  [5XGAP[0m package [5XIO[0m. Such streams may
  constitute  an  independent  interest for adapting streams-using [5XGAP[0m code to
  use streams across the network.
  
  Finally,  the  manual  describes how the communication by [5XSCSCP[0m goes between
  several instances of the [5XGAP[0m system, but the same behaviour is expected from
  any  [5XSCSCP[0m-compliant  application:  the  set  of  supported [5XOpenMath[0m symbols
  clearly  will  be  different,  but  the rules of communication are precisely
  specified  in  the  [5XSCSCP[0m  specification  [FHKLLRb]. See the homepage of the
  SCIEnce  project  [7Xhttp://www.symbolic-computation.org/[0m  for  the information
  about  [5XSCSCP[0m-compliant computer algebra systems and other tools developed in
  the project.
  
