World Conquest Chronicles

World Conquest Chronicles

go-exercises-backend, v1.0

Back-end of the service for solving programming exercises.

Major version. Implement consuming solution results via the RabbitMQ message broker.

Change Log

  • RESTful API:
    • models:
      • solution model:
        • storing:
          • correctness flag;
          • testing result:
            • represented by a string;
        • operations:
          • updating by an ID;
  • interaction with queues:
    • operations:
      • consuming solution results:
        • concurrent consuming;
        • requeue the solution on failure;
    • set a maximal size for the used queues.

Features

  • RESTful API:
    • models:
      • task model:
        • storing:
          • title;
          • description;
          • boilerplate code;
          • test cases:
            • all test cases are represented by a single string;
        • operations:
          • getting all tasks;
          • getting a single task by an ID;
          • creating;
          • updating by an ID;
          • deleting by an ID;
      • solution model:
        • storing:
          • task ID;
          • code;
          • correctness flag;
          • testing result:
            • represented by a string;
        • operations:
          • getting all solutions by a task ID;
          • getting a single solution by an ID;
          • creating;
          • updating by an ID;
    • representing:
      • in a JSON:
        • payloads:
          • of requests;
          • of responses;
      • as a plain text:
        • errors;
  • server:
    • storing settings in environment variables;
    • supporting graceful shutdown;
    • logging:
      • logging requests;
      • logging errors;
    • panics:
      • recovering on panics;
      • logging of panics;
  • databases:
  • interaction with queues:
    • using the RabbitMQ message broker;
    • common properties:
      • automatic declaring of the used queues;
      • passing of a message data in JSON;
    • operations:
      • producing solutions:
        • concurrent producing;
      • consuming solution results:
        • concurrent consuming;
        • requeue the solution on failure;
  • distributing:

Repository

Link: https://github.com/thewizardplusplus/go-exercises-backend/tree/v1.0.

Content: code.

License: MIT.