ndt7-js icon indicating copy to clipboard operation
ndt7-js copied to clipboard

client should support client supplied metadata

Open critzo opened this issue 4 years ago • 3 comments

The current JS client M-Lab provides supports the addition of metadata about the client.

The ndt7-js reference client should also support this.

critzo avatar Oct 06 '20 15:10 critzo

The mechanism I'm thinking of supporting is the following:

  • clients provide extra http parameters to the locate API request.
  • the locate api copies "safe"/"predefined" parameters from that request to the websocket URLs generated for access to the measurement service

For example:

https://locate.measurementlab.net/v2/nearest/ndt/ndt7?client_name=foo&client_version=0.1.1

Generates URLs like:

wss://ndt-mlab1-foo01.mlab-oti.measurement-lab.org/ndt/v7/download?client_name=foo&client_version=0.11&access_token=...

This would preserve the current behavior where clients only use the urls provided by the locate api without needing to manipulate them.

stephen-soltesz avatar Oct 30 '20 18:10 stephen-soltesz

The method described above is now in production, and in use by at least two clients. Please use this method for the Javascript client also.

stephen-soltesz avatar Nov 18 '20 21:11 stephen-soltesz

At a minimum the ndt7-js client should provide a client_name= parameter to the locate request identifying that this is the ndt7-js client. The ndt7-client-ios and ndt7-client-android clients already do this. Ideally, the ndt7-js client would also provide client_version=. These variables would be propagated to the ndt client metadata.

stephen-soltesz avatar Jun 10 '21 14:06 stephen-soltesz