Public | Automated Build

Last pushed: 2 years ago
Short Description
Short description is empty for this repo.
Full Description

Designing a REST interface for CSPA command line services

This repo contains two services for the common statistical processing architecture.

  • Linear Rule Checking (LRC), for checking records for validity
  • Linear Error Localization (LEL), for finding erronuous values in records, given a set of restrictions.

Both services can be run as command-line tools (CLI) or via a Web API- REST interface.

A generic REST interface for CSPA services is described in proposal_rest_interface.pdf. Both services implement the proposed interface.

To install

There are (at least) three options for installing the services:

  • By running a prebuild docker image (edwindj/cspa-rest).
  • By downloading the repo and installing software on Windows or Linux
  • By using Vagrant, which will create an Ubuntu virtualbox VM.


  • install docker
  • Run
    $ sudo docker run -d -p8080:8080 edwindj/cspa-rest
    This will start a docker container with both services running that exposes port 8080 to the OS.
    The docker image is automatically build from the vagrant/Dockerfile.

Complete install

(for ubuntu 14.04 you can also use vagrant/ to do the install)

  • Install R and run
    R -e "install.packages('docopt','editrules', 'jsonlite','rspa')"
    This will install R packages on which the services depend.
    The command-line interface should work after this installation.

For the REST interface:

$ npm install

This will install nodejs dependencies for cspa_rest. (The dependencies are given in file "./packages.json")

  • Run the server:
$ npm start

or (on Ubuntu)

$ nodejs server.js


Alternatively you can install a VM image that contains all the software and a running CSPA service that can be tested on localhost:8080.

To install you will need to install vagrant and virtualbox.

$ cd vagrant
$ vagrant up

To test the service run:

$ ./LRC/example/

Testing the service

Docker Pull Command
Source Repository