mumpsAPI
Version 1.0.1.1
Description
mumpsAPI is a TCP/IP server that runs on the MUMPSV1 V1.60+ system. This version implements 15 different requests that attempt to replicate the equivalent functionality of the nodeM project. These are the current requests implemented:
- Verify client connection.
- Disconnect client from server.
- Get the MUMPS version string.
- Set data to a global node.
- Get global node data value.
- Kill a global or global node.
- Get the $Data value of a global node.
- Get the $Order value of a global node (forward and reverse).
- Get the reverse $Order value of a global node.
- Increment the record count in a global node.
- Merge one global array into another.
- Get a list of global names from the directory.
- Incrementally lock a global node.
- Incrementally unlock a global node.
- Call an extrinsic function.
Although the general functionality is replicated, mumpsAPI is not a replacement for nodeM. NodeM is designed to run in-process on GT.M. The mumpsAPI implementation has expanded the functionality and, in some cases, the response message has changed.
The following are some mumpsAPI features:
- All data requests and responses are formatted in JSON.
- All informational and error messages are formatted in JSON. These messages are returned to the client as well as logged to a file within the database directory. The log file records all pertinent messages for one server session. A new server session creates a new sequential file.
- A management utility is supplied that starts and stops the server as well as view the status of the server. Additionally, it lets the manager customize the server policies.
- A test client (%mapitcl) is included. It exercises all of the functions listed above.
- A unit test routine (%mapitun) is included that tests and verifies some fundamental functionality.
- A code transformation routine (%mapicdt) routine exists for the programmer to generated routines that contain hidden functionality for the MUMPS system being supported or debugging.
- A documentation routine(%mapidoc) exists that, when run, will display each or all routines documentation.
- Two guides are included in the kit - Programmer's Reference Guide which outlines how to construct the requests and an Administrator's Guide which outlines how to operate the system.
Kit Contents
The kit consists of a set of % routines that implements TCP/IP server for the MUMPSV1 system.
Requirements
The following are required to install the mumpsAPI server.
Installation
To install or upgrade the server side,and follow the instructions listed below.
- Download the .zip file from SourceForge.
- Expand the kit file into a directory of your choice. Typically, the directory that holds the MUMPSV1 system is easiest.
- All routines are prefixed by %mapi*. Make sure you do not have any routines beginning with this prefix in the MGR UCI.
- Sign into the MGR UCI in programming mode and invoke the %RS utility. Import the routines.
- Now you must initialize the system. To do this, execute the following command. It will setup all default globals in the MGR area.
do ^%mapiint
- At this point the system is ready to run. Go to the Administrator's Guide for instructions on how to management the system.
- To program against the mumpsAPI, goto the Programmers Reference Guide.
Known Problems
- The server has not been tested with non-MUMPS clients such as JavaScript.
- The server sends all responses back as strings and does not differentiate between strings and numbers.
To Do
The following is a list of enhancements that should be made to the mumpsAPI package:
- Enhance the test client routine %mapitcl to be interactive. Currently, all the functions are hardwired.
- Fix the code that returns numerical values. Currently, everything is returned as a string.
- Build a JavaScript test script that replicates the functionality of the %mapitcl routine.
Project Members: