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

Support multiple callbacks #55

Closed
Naatan opened this issue Dec 20, 2016 · 2 comments
Closed

Support multiple callbacks #55

Naatan opened this issue Dec 20, 2016 · 2 comments
Assignees
Labels

Comments

@Naatan
Copy link

Naatan commented Dec 20, 2016

At the moment there is no way of specifying whether a response is final or if there are more responses, meaning JSON-RPC only supports a single response for each request. This means it does not cover use-cases where the server sends response data as it comes in, rather than having to wait for all the response data to complete and then send it. Think for an example of a search engine that uses JSON-RPC.

I suggest simply adding a field called complete which indicates whether this is the last response for the given request id.

@pavlov99
Copy link
Owner

Yes, correct, there is no such case. And I would argue whether it is good to implement such architecture. If you would like to receive multiple responses as they are generated, then it is server-side push message. It would not help to keep a connection with the server and wait for the "final" response. I believe, that web-sockets could help to address the issue. What do you think about it?

@pavlov99 pavlov99 self-assigned this Feb 9, 2017
@pavlov99
Copy link
Owner

pavlov99 commented Feb 9, 2017

No further feedback. Closing the issue.

@pavlov99 pavlov99 closed this as completed Feb 9, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants