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

Resolve location endpoint #51

Closed
jimaek opened this issue Mar 25, 2022 · 6 comments · Fixed by #88
Closed

Resolve location endpoint #51

jimaek opened this issue Mar 25, 2022 · 6 comments · Fixed by #88
Assignees
Milestone

Comments

@jimaek
Copy link
Member

jimaek commented Mar 25, 2022

Resolve location endpoint for magic like "Ping from 10 locations in Eastern Europe".
Its needed for easier development of web and cli tools.

It should also support partial names like "frankfurt" when in reality the probes are at "frankfurt am main" or "amazon" when full is "amazon.com inc"

Example inputs:

The output should be something easily usable for the measurement endpoint.

@jimaek
Copy link
Member Author

jimaek commented Apr 5, 2022

To clarify all of the above is supposed to get eaten by a single input "location". Its not different parameters, they are all examples the user should be able to pass to a single input and get back a resolved json of correctly formatted location parameters that the /measurement endpoint can process.

So its a conversion of 1 magic input to many typed inputs

@jimaek jimaek assigned patrykcieszkowski and unassigned zarianec Apr 7, 2022
@zarianec
Copy link
Contributor

zarianec commented Apr 7, 2022

Summary of internal discussion:

  1. Build additional probe client metadata object index that will contain all the possible values user can do "magic" queries over.
  2. Maintain manual aliases for some locations like United States of America -> USA
  3. Simulate partial match using String.contains() filter

New probe client metadata object:

{
    "location": {
        "continent": "EU",
        "region": "western-europe"
        "country": "UK",
        "state": "TX"
        "city": "frankfurt at main"
        "isp": "Amazon.com ISP Provider"
    },
    "index": [ "europe", "united kingdom", "western europe", "texas", "frankfurt at main", "amazon.com isp provider" ],
}

@jimaek
Copy link
Member Author

jimaek commented Apr 9, 2022

Manual aliases we should add:

  • USA = us
  • England = uk
  • AWS = amazon.com inc.
  • united states = us
  • vultr = choopa llc
  • other?

@patrykcieszkowski
Copy link
Contributor

  • other?

I don' think we discussed that - do we want to include both ISO and full state/country/continent formats?

@patrykcieszkowski
Copy link
Contributor

  • GB = united kingdom
  • northern ireland = GB

@jimaek
Copy link
Member Author

jimaek commented Apr 11, 2022

do we want to include both ISO and full state/country/continent formats

Yes, the user should be able to write "Germany" and it should automatically convert to "DE". I have it as an example input in the task. So all those inputs should work correctly

@jimaek jimaek added this to the Public Repo milestone Apr 18, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants