Develop a system adapter
Michael Röder edited this page Dec 6, 2016
·
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](general hints on components) should be read.
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 and RabbitMQ host name that are available as [environment variables](general hints on components).
- It has to be connected to the [command queue](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.SYSTEM_READY_SIGNAL
id (=0x01
) on the command queue. - It has to listen to the command queue and should react on the
Commands.TASK_GENERATION_FINISHED
id (=0x0F
). - It has to implement the API of the benchmark with which it should be benchmarked. Note that this API can vary and should be described in more detail by the benchmark. Typically, the API looks as follows.
- The system might connect to the
hobbit.datagen-system.<sessionId>
queue to receive data. - The system has to connect to the
hobbit.taskgen-system.<sessionId>
queue to receive tasks. - The system has to connect to the
hobbit.system-evalstore.<sessionId>
queue to send its result to the evaluation storage. - All three queues follow the work queue pattern and have to be setup with
- their queue name (
<sessionId>
has to be replaced with the current session id), durable = false
exclusive = false
autoDelete = true
- and no additional arguments
- their queue name (
- The system might connect to the
The typical messages of the different queues are described in the following.