hydra icon indicating copy to clipboard operation
hydra copied to clipboard

Allow API client and server to negotiate features

Open abailly-iohk opened this issue 3 years ago • 1 comments

Why

Clients might have different requirements about the data they want from our API Server:

  • Some might not want to be fed the history of previous messages when they connect
  • Some might want to send/receive transactions in JSON or CBOR

What

  • Provide a negotiation phase when a client connect to API Server
  • Server sends Greeting message as before, possibly with a version
  • Client sends a Greeting message with options set
  • Server configures the connection according to the options.
  • (optional): Server sends Available options in its initial Greeting message
  • Then, we want to use this negotiation mechanism in the two example configurations we encountered so far:
    • Configurable transaction format
    • Configurable latching of history

How

  • [ ] Create a negotiation mechanism
  • [ ] #371
  • [ ] #379

abailly-iohk avatar Jun 02 '22 07:06 abailly-iohk

Another idea by @KtorZ is to use the sub-protocol negotiation in the WebSocket standard.

ch1bo avatar Jun 28 '22 08:06 ch1bo