Anonymization Layer-Reputation System protocol

For the communication between the Anonymization Layer and the Reputation System a simple line based protocol is used. The Reputation System acts as a TCP server and listens on 127.0.0.1 port 4444. All commands are sent by the Anonymization Layer. All commands and responses end with a single newline (`"\n"` in C).

newuser n
A new user with index n has been added.
No response from the Reputation System.
feedback n m x
User n sent a feedback about user m with value x.
No response from the Reputation System.
kcabdeef n m x
User n previously sent a feedback about user m with value x and now wants to undo it.
No response from the Reputation System.
query n m
User n wants to query the reputation of user m.
Response
y, the reputation value of m as seen by n
age a
Introduce ageing into all previous feedback by multiplying it with a. (Creates a moving average.)
No response from the Reputation System.
n
The anonymization layer wants to query the ${\displaystyle N}$ (e.g. the last n from a newuser command).
Response
n, the ${\displaystyle N}$.

n and m are integers from the set ${\displaystyle \{1,\ldots ,N\}}$ (with ${\displaystyle N}$ being the last n sent in a newuser command).
x is from the set ${\displaystyle \{-1,+1\}}$
a and y are real numbers, represented with the C format string `g` or `G` (with almost arbitrary precision).