basic server implementation

with an abstract class that can act as either a server consumer or a
client