Skip to content

Client server architecture

Erwin Walraven edited this page Nov 16, 2018 · 11 revisions

The toolbox has been implemented in Java, and it is therefore recommended to implement and test models and algorithms directly in Java files. In case you want to perform constrained planning in another programming language, then it is possible to communicate with the toolbox based on a client-server architecture. The toolbox acts as a server, and external processes can connect to the server in order to request solutions to planning problems. An overview of the architecture is shown below. An example implementation of the client-server communication is provided in the python folder, which provides a full implementation of a Python client.

Starting the server

The toolbox server can be started by running the file executables.Server, which waits for clients that connect on port 8080.

Overview of requests

A request is represented by a string, and the server responds to a request by sending a response string. Below we give an overview of the requests that can be handled by the server.

Instance requests

  1. dumpDefaultDomain_domainName_numAgents_numDecisions - Writes a problem instance to an XML file for the given number of agents and decisions. The domainName should be one of the following options: advertising, cbm, maze, tclFixedLimit, tclMultiLevel, webad. Example request: dumpDefaultDomain_advertising_3_10

Solve requests

  1. solveDefaultDomain
  2. solveXMLDomainMDP
  3. solveXMLDomainPOMDP

Simulation requests

  1. startSimulation
  2. startNewSimulationRun
  3. getActionCMDP
  4. getActionCPOMDP
  5. updatePolicy

Clone this wiki locally