This manual is meant to make the user familiar with the method used to compile and run mumps programs with the Mumps compiler which contact a server for their global data. It is fairly simple once the Mumps compiler package is compiled and running.
First, you must choose which server you would like to run to make the global data accessible. You currently have three choices:
Once you have chosen which server to run, you can run the server by executing it in a shell:
The server is now running and ready for connections! If you need to stop the server at any time, send it a SIGINT. All servers also will output minimal information on client connections, and can optionally print out statistics on the amount of transactions at regular intervals.
Global data will persist through server runs, just as a local mumps program would. This allows you to switch between TCP, SSL and UDP servers while serving the same data.
Please note that while you can run both the UDP and TCP or UDP and SSL servers at the same time, the TCP and SSL server cannot ever be run at the same time, as SSL is run over TCP and they both use the same port number.
To compile a Mumps program as a client to a server, use the -s option to mumpsc. This option takes one of three characters depending on which server type you will be connecting to:
Once a Mumps client is compiled, it will by default attempt to connect to localhost in order to contact the server. You can override this at any time by passing an option to the Mumps client as it is being run. For example: ./foo 192.168.9.1 would connect to the server running at 192.168.9.1. If a client will most likely be connecting to an IP that is different from localhost, you can change the default server by running mumpsc with the -d<IP> option. This will change the default server to <IP>.
The client should behave as a normal Mumps program would, as if it was accessing a local global database.
If for some reason you are compiling a subfunction from mumps to C and executing it from C only, you should place a call to the client_init() function at the beginning of the subfunction, and a client_close() at the end of the subfunction. These functions behave as follows:
This document was written for the Mumps compiler by Michael Janssen. Any questions or comments can be sent to him at janssen@cns.uni.edu.