Skip to content

Conversation

@tompntn
Copy link
Contributor

@tompntn tompntn commented Aug 31, 2022

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. Each Connection communicates to the Adapter using a Tokio channel.

Each Connection has a notify_price_rx and notify_price_sched_rx channel. When a message is received on one of these, the corresponding notify_price/notify_price_sched JRPC notification is sent to the Connections client.

@tompntn tompntn requested a review from Reisen August 31, 2022 11:10
Copy link
Contributor

@Reisen Reisen left a 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!

@tompntn tompntn merged commit 47ca181 into main Sep 5, 2022
@tompntn tompntn deleted the pythd-jrpc-api branch September 5, 2022 16:27
drozdziak1 added a commit that referenced this pull request May 9, 2023
drozdziak1 added a commit that referenced this pull request May 9, 2023
* oracle.rs: hotfix: Remove stray loop break

* test_integration.py: add a second publisher for permissions testing

* nudge GitHub

* nudge GitHub #2
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants