Skip to content
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

Arbitrary JSON RPC subscription API? #27

Open
hussein-aitlahcen opened this issue Aug 12, 2021 · 2 comments
Open

Arbitrary JSON RPC subscription API? #27

hussein-aitlahcen opened this issue Aug 12, 2021 · 2 comments
Assignees
Labels
enhancement New feature or request

Comments

@hussein-aitlahcen
Copy link

Hi everyone!

We tried to use the the price webosocket endpoint with the jsonrpc library of parity.
We could not manage to make it work because the subscribe endpoint is expected to provide a subscription ID straight in the result field of the rpc response. But the current implementation is wrapping the ID in an object with a subscription field.
We checked various websocket subscription implementations over JSONRPC and all of them were answering with the ID straight in the result field.

I updated the endpoint to be compliant with the common implementation PR #20 (I also linked many known implementations of it which are behaving correctly).

Any chance we get this merged? I don't know whether there are more stuff to change so feel free to give a strong review on my changes.

NOTE: even your website is using the common implementation for the price feed :)

@mass
Copy link
Contributor

mass commented Aug 12, 2021

Hi @hussein-aitlahcen ,

Thank you for filing this detailed issue and making the PR as well.

While I think the current pythd JSON-RPC interface technically conforms to the JSON-RPC 2.0 Spec (https://www.jsonrpc.org/specification), I agree that it is breaking from some common usage patterns, as you have identified.

We will be happy to merge the PR and make these changes at some point, but we would like to wait until things have quieted down a bit, as this will be a breaking change.

@hussein-aitlahcen
Copy link
Author

Hi @mass! Thanks for the quick reply, I understand your concerns. Feel free to ping me if something has evolved once you plan to merge it :).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
2 participants