NetSender clients should report their vars

Issue #23 resolved
Alan Noble created an issue

Currently NetReceiver variables (aka “vars”) are one-way, i.e., service to client. Users sets vars via the service (NetReceiver or VidGrind) and the service then informs the client that vars have changed by means of updating the var sum. The new vars are then communicated to the client in the body of the response to the /vars request.

If clients were to communicate to the service ahead of time what vars they support, then it would be possible for the service to validate user input and ensure that only valid vars are ever accepted/used. It is proposed that the client send a JSON representation of vars, by extending /vars to use HTTP POST instead of the HTTP GET.

For example:

{ “Input”:string”, “Quantization”:”int”, …}

When a client has posted its vars ahead of time, any var that is not included in the list will be rejected by the service. The type information will also enable the service to perform basic validation.

When a client has NOT posted its vars then any var will be accepted by the service to ensure backwards compatibility.

Comments (5)

  1. Saxon Milton

    @Alan Noble going to create an issue on av for the client side code additions that would need to happen to achieve this. Will post link shortly.

  2. Alan Noble reporter

    BTW, please bump up the NetSender protocol number from 151 to 160 to reflect that this a new feature, not a bug fix.

  3. Log in to comment