Add support for custom back-ends

I've changed the server implementation in order to support custom back-ends. It reduces the amount of configuration for the server as well as simplifies the code as there's no need for checking which transport is to be used.