1. 15 Nov, 2020 2 commits
  2. 02 Nov, 2020 8 commits
    • 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
      2610a8da
    • Tomáš Pecka's avatar
      worker: Remove unnecessary dynamic allocation · db97784c
      Tomáš Pecka authored
      :)
      db97784c
    • Tomáš Pecka's avatar
      worker: refactor interface and signal handling · 546ac671
      Tomáš Pecka authored
      This was a little bit overdesigned, probably. KISS.
      546ac671
    • Tomáš Pecka's avatar
      worker main: Add logging verbosity · 55acb91b
      Tomáš Pecka authored
      Introduce "--log-level" option for log verbosity. Remove
      ALT_WORKER_DEBUG env var detecting in main. Instead move it into
      docker entrypoint.
      55acb91b
    • Tomáš Pecka's avatar
      worker: Introduce argparse for CLI argument parsing · 315728ca
      Tomáš Pecka authored
      I have some plans with CLI arguments in the next patches and I do not
      want to parse it manually. Argparse [1] looks like a nice header-only
      library for that.
      
      [1] https://github.com/p-ranav/argparse
      315728ca
    • Tomáš Pecka's avatar
      worker: Do not bundle catch2 · e76251d3
      Tomáš Pecka authored
      Let's just say that the Catch2 framework should be there. We do not care
      how it gets there.
      Also create "testing.hpp" proxy header file which shadows the tests from
      knowing that they are part of Catch2 testing suite.
      e76251d3
    • Tomáš Pecka's avatar
      worker: reformat codebase · 59e96052
      Tomáš Pecka authored
      This was unbearable so I am introducing a .clang-format configuration
      file and reformatting codebase.
      59e96052
    • Tomáš Pecka's avatar
      worker: Log with spdlog · 81b22fec
      Tomáš Pecka authored
      Remove manually writen loggers in favour of spdlog.
      81b22fec
  3. 31 Oct, 2020 1 commit
    • Tomáš Pecka's avatar
      Use ninja in dockerfiles · e046ef3b
      Tomáš Pecka authored
      We are using alt's docker images based on alpine:edge. As of today (Oct
      31, 2020), strange errors began to come from cmake/make.
      
      ```
       -- Check for working C compiler: /usr/bin/cc
       -- Check for working C compiler: /usr/bin/cc - broken
       CMake Error at /usr/share/cmake/Modules/CMakeTestCCompiler.cmake:66 (message):
         The C compiler
      
           "/usr/bin/cc"
      
         is not able to compile a simple test program.
      
         It fails with the following output:
      
           Change Dir: /app/CMakeFiles/CMakeTmp
      
           Run Build Command(s):/usr/bin/make cmTC_49c71/fast && /usr/bin/make  -f CMakeFiles/cmTC_49c71.dir/build.make CMakeFiles/cmTC_49c71.dir/build
           make: /usr/bin/make: Operation not permitted
           make: *** [Makefile:140: cmTC_49c71/fast] Error 127
      
         CMake will not be able to correctly generate this project.
       Call Stack (most recent call first):
         CMakeLists.txt:2 (project)
      ```
      
      However, ninja builds seem fine. In the alpine:edge they have the
      samurai[1] implementation of ninja. Let's use that as a workaround.
      
      [1] https://pkgs.alpinelinux.org/package/edge/main/x86_64/samurai
      e046ef3b
  4. 28 Oct, 2020 2 commits
    • Tomáš Pecka's avatar
      Cleanup in CMake. · c6ae6d81
      Tomáš Pecka authored
      - Fixed building tests (use standard BUILD_TESTING var)
      - Sort filenames
      - Use standard FindThreads instead of adding -pthread to CXXFLAGS
      c6ae6d81
    • Tomáš Pecka's avatar
      Report more detailed ALT errors to WebUI · 015f4717
      Tomáš Pecka authored
      Reporting only the top level exception from ALT is simply not enough.
      Compare the difference between these two errors logs propagated to the
      webui and/or worker's logger.
      
      Error: Evaluation of algorithm string::Parse failed.
      
      vs.
      
      Evaluation of algorithm string::Parse failed.
       -> Multiple initial states are not avaiable for DFA type
      
      Closes #41.
      015f4717
  5. 07 Oct, 2020 1 commit
  6. 02 Jun, 2020 1 commit
  7. 01 Jun, 2020 4 commits
  8. 31 May, 2020 5 commits
  9. 30 May, 2020 2 commits
  10. 29 May, 2020 4 commits
  11. 28 May, 2020 6 commits
  12. 25 May, 2020 1 commit
  13. 21 May, 2020 3 commits