simple server + protocol implementation