The current architecture of DIVAServices is visualized in the Figure below:

DIVAServices Architecture

So we can see DIVAServices is comprised of three different elements:

  • DIVAServices (the core framework)
  • A Docker server
  • A file storage server

Each of these elements is described below.

DIVAServices (the core framework)

The core framework is programmed in TypeScript a super script of JavaScript with added types.

DIVAServices is as a web server and handles all incoming requests and serves back the information.

DIVAServices uses JSON as data transmission format.

Handling GET Requests

In case of an incoming GET request, all that the framework needs to do is look up the specific information and send it back to the client.

Handling POST Requests

A POST request is always used to execute a particular method. This can be achieved by calling the URL of the method. DIVAServices parses this incoming request, perform some sanity checking and execute a Docker Container of the specific method. Once the method finished, DIVAServices will retrieve the results and provide them to the client.

Asynchronous Execution

Because some methods can take a long time until they are executed, DIVAServices handles the communication for executing methods in an asynchronous way.

Whenever a method execution is started, the client immediately receives a JSON response as follows:

  "results": [
      "resultLink": ""
  "status": "done",
  "statusCode": 202

The client that started the execution has then to consistenly poll the results:resultLink URL(s). Once an execution is finished this GET request will respond with a JSON object like the following:

  "output": [
    ... specific outputs of the method
  "status": "done",
  "resultLink": "",
  "collectionName": "smugquintessentialbaiji"

The status field can be used as an identifier to check against if the execution is finished or not.

Docker Server

DIVAServices makes use of Docker in order to execute the methods. For each image a Docker Image is created that contains the method including all the binaries and libraries required for it to run.

A tutorial for how to create such a Docker image is available here

Common Workflow Language

In order to actually execute the Docker images (and to prepare for provding pipeline support on DIVAServices) we make use of the Common Workflow Language.

File Storage

The last piece in the architecture is the file storage. We rely on a normal Linux filesystem that is shared between DIVAServices and Docker through NFS.