Compile instructions
Pre-requisites
- You will need CMake, Golang, Redis installed to run the program. Program talks to redis on port 6379
- The webservice is written in Golang
- The webservice is running by default on port3000. It can be changed by giving the "-p=" on the executable
Compile procedure
- cd Peek/server
- mkdir build
- cd build
- cmake ..
- make
- ./httpserver
Data model
In redis, there are a bunch of keys and sets created for handling the bookings
a. Timestamp keys, start with "ts:" are timestampids storing timestamp information in a json b. There is a dated set (eg. 2014-07-22) that holds all timestamp keys for a particular day c. Boat keys, start with "boat:" are boatids storing boat information in a json d. There is a set name boats, which contain all the boat ids created e. There is a set starting with "asmt:", which stores the association of a boatid to the many associated timestampids
Caveats due to time constraint
- Have not put any logging information
- Have not considered all corner and validation scenarios