Except the README.md, all python source codes are licensed under the GPL3 license.
Create a TCP server (in your language of choice) that implements a text based protocol for managing counters.
- Counters are integers that have label.
- Counters can only be incremented.
- The counter's value resets every minute. However, previous values of the counter must be kept.
- If no increments took place during a particular minute, the value for that minute is 0.
Commands that the TCP server should accept:
- CREATE_COUNTER - Parameters: label of the counter to create
- INCREMENT_COUNTER - Parameters: label of the counter to increment
- GET_COUNTER_VALUES - Parameters: label of the counter, from date, to date - this should return value of the counter between that date range, if the date range is an hour long, then it should return 60 values for the counter.
- AVERAGE_COUNTER_VALUE - Parameters: label of the counter, from_date, to_date
- returns the average value of the counter during that date range.