The project is an implementation of a facade over database, which task is to properly handle requests given as JSON objects, store and fetch information during run.
The full specification (in polish language) is given here.
Program is written in object oriented, modern style C++, compiles and runs both on Windows and Linux.
- c++11 compiler
- installed PostgreSQL database
- pgcrypto extension
For convenience, create build
directory, run cmake
, then make
. As specified in the task, first run the program with --init argument.
From now on, you can use the executable to give orders to the system.
Abstract factory pattern is at the very core of the application. The two modes of run (init
and standard) are completely separated by being implemented in two unrelated factories. The product is a instance of class responsible for handling a particular request. Every request handler is encapsulated in one class. The main loop of the program operates on abstract commands, which makes it very easy to add next handlers without modifying existing parts of code.
E-R diagram for PostgreSQL database: