Menu

Home

Terry L. Wiechmann

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:

  1. Verify client connection.
  2. Disconnect client from server.
  3. Get the MUMPS version string.
  4. Set data to a global node.
  5. Get global node data value.
  6. Kill a global or global node.
  7. Get the $Data value of a global node.
  8. Get the $Order value of a global node (forward and reverse).
  9. Get the reverse $Order value of a global node.
  10. Increment the record count in a global node.
  11. Merge one global array into another.
  12. Get a list of global names from the directory.
  13. Incrementally lock a global node.
  14. Incrementally unlock a global node.
  15. 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.

  • MUMPSV1 V1.60+ running on any one of the supported platforms.

  • Storage in the MGR UCI that does not contain routines in the %mapi* namespace.

Installation

To install or upgrade the server side,and follow the instructions listed below.

  1. Download the .zip file from SourceForge.
  2. Expand the kit file into a directory of your choice. Typically, the directory that holds the MUMPSV1 system is easiest.
  3. All routines are prefixed by %mapi*. Make sure you do not have any routines beginning with this prefix in the MGR UCI.
  4. Sign into the MGR UCI in programming mode and invoke the %RS utility. Import the routines.
  5. 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

  6. At this point the system is ready to run. Go to the Administrator's Guide for instructions on how to management the system.
  7. To program against the mumpsAPI, goto the Programmers Reference Guide.

Known Problems

  1. The server has not been tested with non-MUMPS clients such as JavaScript.
  2. 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:

  1. Enhance the test client routine %mapitcl to be interactive. Currently, all the functions are hardwired.
  2. Fix the code that returns numerical values. Currently, everything is returned as a string.
  3. Build a JavaScript test script that replicates the functionality of the %mapitcl routine.

Project Members: