Skip to content

Develop a system adapter

Michael Röder edited this page Feb 12, 2018 · 12 revisions

This article is a tutorial to write a system adapter for an existing system that should be benchmarked inside the Hobbit platform. It is recommended to read the overview article before reading this tutorial. Additionally, the general hints on components should be read. If the system adapter will be developed in Java, there is a more detailed tutorial how this development can be supported by using the HOBBIT core library.

Benchmarked system API

The API the system (or system adapter) has to offer to interact with the Hobbit platform is defined as follows.

  • It has to use the hobbit session id, RabbitMQ host name and the experiment URI that are available as environment variables.
  • It has to be connected to the command queue
  • After the system is started, it has to initialize itself. At the end of the initialization, the system has to send the Commands.BENCHMARK_READY_SIGNAL id (=0x02) on the command queue.
  • It has to listen to the command queue and should react on the Commands.START_BENCHMARK_SIGNAL id (=0x11). Note that this message comes with the container ID of the system container. From that moment on, the benchmark is responsible to react on a termination of the system (i.e., a Commands.DOCKER_CONTAINER_TERMINATED (=0x10) command is received with the id of the system container attached.
  • It has to implement the its own API that is used to communicate with the benchmarked system.
  • When the benchmark has generated its result, a Commands.BENCHMARK_FINISHED_SIGNAL is sent to the command queue with the result model attached to it. The result model has to be a RDF model serialized as JSON-LD.