• Tomáš Pecka's avatar
    worker: Split worker into queue manager and evaluator · 2610a8da
    Tomáš Pecka authored
    In case the worker segfaults (ALT unfortunately sometimes segfaults)
    then the job is not acknowledged to the server. This causes another
    worker to pick up the job and segfault too.
    Invoking acknowledge before evaluation is not possible; the server could
    assign us a new job before finishing this one and whole load balancing
    would be useless.
    Hence I propose splitting worker into two executables.
    The first one, evaluator, would simply read json from input, evaluate and
    compose a json output. Nothing more.
    The second one, worker, would manage all the queue stuff (receiving,
    sending, acknowledging, ...) and it runs the evaluator in a forked job.
    This way we can not only handle timeouts but we can also see when the
    child segfaults and report it properly to the server.
    Closes #44
Last commit
Last update
evaluator Loading commit data...
main.cpp Loading commit data...
testing.hpp Loading commit data...