-
-
Notifications
You must be signed in to change notification settings - Fork 53
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
Consider backwards-compatible extension for returning of streams #211
Comments
I really like the idea of streaming this way as opposed to eth_subscribe or swagger callbacks as it lends well to async generators, hooks, and rx js observer style patterns, and changes very little. This might is a good use case for Specification Extensions. you can use for example:
Experimenting with the extensions seems like a good way to test out the viability of a proposal like this. |
Thanks! I'm glad the idea resonates with you. I like the idea and design of the protocol extensions aspect of the schema. One thing I should add is that I'm one of the maintainers of braid. There has been some discussion about moving it's bespoke streaming protocol to be compliant with OpenRPC. In practical terms, should I create a standalone project that details the extensions and provides a reference implementation? Is the best place to post a link to this for feedback here on this issue? Btw, there are additions to the protocol that I'm working on for back-pressure. |
@dazraf thanks for taking a look at OpenRPC! As @shanejonas mentioned, specification extensions is a great method through which to extend, but also propose additional functionality to the specification. A great example of using specification extensions can be seen with OpenAPI + AWS (its fundamentally the same concept). This is a good example of extensions which would never make sense to add directly to open api, but allows for open api documents to specify additional fields necessary for AWS API Gateway to function. Alternatively, A feature such as examples, servers, any open rpc field really, could have been first implemented and prototyped as a vendor extension, and only once vetted would it be 'promoted' from vendor extension to part of a newer version of the spec. At the moment, we have yet to dive too deep into vendor extensions (the project is still relatively young). That said, we don't have any recommended format to describe a vendor extension yet. You are a pioneer :). Would love to hear about your back-pressure stuff. Happy to discuss it with you in a separate issue :). Also, please do link back what you come up with! I'm very excited to have others contributing! |
Awesome, thank you! I will update this issue with progress. |
@dazraf I really like this idea. Seems like it would be a great addition to the JSON-RPC protocol. Maybe we should adopt the JSON-RPC 2.0 spec, and make a 3.0 spec that includes this idea. :) |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
@dazraf the desire to adopt JSON-RPC 2.0 and create a 2.1 that incorporates your streaming feature is BURNING INSIDE OF ME. Thoughts? |
Hi Belford, |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
Firstly, congratulations on the spec! This is a big step forward.
This issue is a proposal to enable a service to return streamed responses.
It's reasonably commonplace for services to expose methods that return a (potentialy infinite) stream of objects. These can be used to stream notifications of transactions, for example.
Can we consider a backwards compatible extension to JSON-RPC to support streamed responses for streaming transports (e.g. http/2, websockets, or overlays like socket.io or sockjs).
An example of such an extension is available here:
https://gitlab.com/bluebank/braid/blob/master/braid-core/README.md#invocation-protocol
Thank you!
The text was updated successfully, but these errors were encountered: