hobbit-project / platform

HOBBIT benchmarking platform
GNU General Public License v2.0
23 stars 9 forks source link

Long pull durations can lead to failing experiments #47

Closed MichaelRoeder closed 7 years ago

MichaelRoeder commented 7 years ago

Problem

The pulling of Docker images might take some minutes. If a benchmark or system asks the platform to create another container, the pulling of the container image might take a lot of time in which the benchmark can not perform its task since it has to wait for the platform to acknowledge the container creation. This leads to two problems.

  1. There is a timeout in the core library causing components to assume that the container creation didn't took place if the platform controller needs more than 1 minute (https://github.com/hobbit-project/core/blob/master/src/main/java/org/hobbit/core/components/AbstractCommandReceivingComponent.java#L258).
  2. The time that is needed to pull all the images of a benchmark or system reduces the time an experiment has for the benchmarking itself which might even lead to the experiment being aborted because of exceeding the maximum runtime.

Solution

Problem 1

For problem 1, an easy solution is to increase or even remove the timeout. A better solution would be that the platform controller sends regular messages to the requesting client to show that its message has been received and is going to be executed.

Problem 2

The pulling of Docker images in general should be done before an experiment is started. This could be achieved by offering the definition of needed images in the meta data of benchmarks and system instances. This would enable the platform to pull the necessary images before the experiment is started.

Note that these meta data shouldn't be inserted into the result triple storage!

MichaelRoeder commented 7 years ago

Supported the proposed solution of Problem 2 by introducing the hobbit:usesImage property for the HOBBIT vocabulary in version 1.0.4-SNAPSHOT of the core library (https://github.com/hobbit-project/core/commit/8a27b32707e7cc90b132ccec1675ab38caa337c2)

MichaelRoeder commented 7 years ago

An example of a system.ttl file using the newly introduced property is https://git.project-hobbit.eu/gerbil/SpotWrapNifWS4Test/blob/master/system.ttl

@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
@prefix hobbit: <http://w3id.org/hobbit/vocab#> .
@prefix gerbil2: <http://w3id.org/gerbil/hobbit/vocab#> .
@prefix nifsys: <http://w3id.org/hobbit/gerbil/nif-sys#> .

<http://w3id.org/hobbit/gerbil/test/SpotWrapNifWS4Test> a  hobbit:SystemInstance; 
    rdfs:label  "SpotWrapNifWS4Test"@en;
    rdfs:comment    "This is a system adapter that simply wraps DBpedia Spotlight."@en;
    hobbit:imageName "git.project-hobbit.eu:4567/gerbil/gerbilnifsystemadapter";
    hobbit:implementsAPI gerbil2:GerbilApiA2KB;
    nifsys:instanceImageName "git.project-hobbit.eu:4567/gerbil/spotwrapnifws4test";
    hobbit:usesImage "git.project-hobbit.eu:4567/gerbil/spotwrapnifws4test";
    nifsys:numberOfInstances "3"^^xsd:unsignedInt;
    nifsys:webserviceUrl "http://HOST:8080/spotlight" .
MichaelRoeder commented 7 years ago

Updated the HOBBIT ontology by adding the new hobbit:usesImage property and defining hobbit:imageName as its subproperty. https://github.com/hobbit-project/ontology/commit/5f868e37a0bba58ae3b64593e65313be61d0674f

MichaelRoeder commented 7 years ago

Reminder: the hobbit:usesImage have to be removed from the result of an experiment before the result is stored in the triple store since the triple store should not contain any image information.