-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Implement JSON-RPC WebSocket server #93
Conversation
34b9770
to
cdeae1f
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we need a sidebar to discuss this architecture. This server only has 3 routes. It really doesn't need to be this complicated and abstracted.
The process ID is included in the pino log data already
cdeae1f
to
6217796
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The looks quite reasonable now!
Note to reviewer
A good amount of this PR is infra for supporting serverlet routes for HTTP endpoints. Some changes to serverlet's utilities could be brought upstream to accomplish the needs of this integration (lowering the line count for this PR).
In addition to using serverlets for the HTTP protocol, this PR demonstrates the use of serverlets for the WS and JSON-RPC protocols. It turns out with a small change to serverlet's types, it is a nice fit as an framework for building out the necessary middleware for WS and JSON-RPC support. Perhaps this could be accepted as a stand-alone serverlet middleware package for other upcoming WebSocket projects.
CHANGELOG
Does this branch warrant an entry to the CHANGELOG?
Dependencies
noneDescription
none