-
Notifications
You must be signed in to change notification settings - Fork 20
Pythd JRPC Websocket Server #2
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
Conversation
a8d52c8 to
1f478f9
Compare
Reisen
left a comment
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.
Looks good. After reading through it a bit more, I think the Connection type
is being used as a bit of a mishmash for any method related to converting
between the adaptor and websockets which is leading to everything being added
on as a method, but some of this can probably be split out. At least the name
doesn't fully convey how much responsibility this type has.
Fine for now though and otherwise all looks awesome!
* oracle.rs: hotfix: Remove stray loop break * test_integration.py: add a second publisher for permissions testing * nudge GitHub * nudge GitHub #2
This PR creates a websocket server which speaks the Pythd JRPC protocol. It doesn't include any business logic, just the websocket server and the shape of the JRPC messages to it's clients.
The server delegates handling of requests to an
Adapter, allowing us to mock the business logic out in tests. EachConnectioncommunicates to theAdapterusing a Tokio channel.Each
Connectionhas anotify_price_rxandnotify_price_sched_rxchannel. When a message is received on one of these, the correspondingnotify_price/notify_price_schedJRPC notification is sent to theConnections client.