scala based server used as middleware, providing RESTful APIs to clients