Develop, Test, and Deploy an AIMMS Service

Apps used to illustrate the development of services

Developing a useful and robust REST API service requires that it is carefully developed, tested, and deployed. This article is an introduction to a series of articles that provide guidance in the development of such a service in AIMMS.

Selected aspects important to developing any service are:

  1. Implementation: Coding and testing the service. Which we will do using an AIMMS project.

  2. Usage: There are two ways in which a service is used:

    1. For its very purpose - a client app that uses the service. Discussions about purpose are outside the scope of this series of articles.

    2. For testing.

    As a REST API service can be used by various separate clients, different software systems can be used to develop the various clients involved.

  3. Deployment: Which computer hosts the service? Can it be run in parallel? Is the usage of the service secure? The effort needed to answer such questions depend on the deployment platform used.

Before we dive into the details of the above, let me introduce the background against which we illustrate the above.

Story

The service developed is intentionally trivial; count the number of *’s in a couple of lines. This is a “Hello World” type of story - it illustrates the basic techniques. An additional advantage of this story is that it is trivial to test whether the response given by the service is correct.

Note that a service implemented in AIMMS can also implement an interesting optimization model; however, optimization applications are outside the scope of this article series.

Overview of associated articles

There are two parts of this series of articles:

  1. In the first part we discuss the service itself.

  2. In the second part clients in various languages are presented, and clients with different purposes.

First Part: Developing the Service

  1. Development architecture of an AIMMS Service Development architecture: an overview of the applications involved and their interactions.

  2. Conventions used in the examples provided A small side note containing the conventions used in the examples. In addition, it explains how each of the client apps presented in this series can be configured.

  3. Creating an AIMMS Server app Coding and internal testing of the service is discussed here. In addition, we discuss how to deploy the service in two ways.

Second Part: Available Client implementations

Once a service is available it can be used. In this part, we present several clients to the same service:

  1. Python: See Using AIMMS Services with a Python Application A small Python app is shown. This app also illustrates the elegance of the Python requests library.

  2. VBA: See Using AIMMS Services with a VBA client A small Visual Basic for Applications (VBA) app inside an Excel workbook is shown. The VBA app uses the win HTTP 5.1 library.

References

  1. AIMMS PRO REST API method documentation:

    1. Obtain a .json file describing the OpenAPI 3.0 specification of AIMMS PRO REST API for your AIMMS Cloud environment.

    2. Import that .json file using the online Swagger Editor

  2. The AIMMS DataExchange library, in particular Providing REST APIs.

Next

Development architecture of an AIMMS Service