-
Notifications
You must be signed in to change notification settings - Fork 86
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
Allow API client to control the server output #380
Comments
Another idea by @KtorZ is to use the sub-protocol negotiation in the WebSocket standard. |
+1, this is something that we are observing when building application build on Hydra and this would help. We are trying to build something like hydra-java-client library and already at the beginning hitting issues described by @abailly-iohk . Something like request message id and response message id with lack of history and protocol similar to what ogmios is using is something that we would like. History could be optionally provided but client needs to be interested in this (somehow). |
I took a look at related code and these are my findings:
So overall I would say the work is pretty easy if we go with the simple solution which is not really ideal but can work. Personally I would do a dirty solution to have something working and then improve later. cc @ch1bo |
Not sure if this is an option. I can imagine that some clients of the hydra-node do require the history to work (e.g. Maybe optional query parameters on the websocket path could work? For example, |
We are loading the history before running the server and then we share the |
@v0d1ch Yeah that's no problem. We need to store/load the history nontheless (in case one client requests it). We only need to make the forwardHistory optional. |
Ok since things have changed from the time this idea was created I am keeping the old wording here just as a reference and I'll update the original to be inline with the actual changes I plan on doing.
|
Why
Clients might have different requirements about the data they want from our API Server:
What
How
We will use websocket path to decide on these two items:
history
and it's value is1
then the server will serve complete historytx-output
and it's value iscbor
then the tx should be displayed as cborExample:
?history=0&tx-output=cbor
Related issues:
The text was updated successfully, but these errors were encountered: