raystack/raccoon

Refactor to simplify http package

NNcrawler opened this issue · 0 comments

Problem

HTTP package is where we put http based servers and handlers. Currently, the entry point of this package (server.go) has all the 3 servers initialization logic. This introduces complexity to the initialization logic of the servers. Dependencies specifically belonging to each server are leaked here potentially making it more difficult to change in the future.
For example, table and ping are specific to websocket. Which introduces complexity.

Is there any workaround?
N/A

What is the impact?
Complexity grows as we add more protocol

Solution
Make the initialization logic independent of each other.