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

Better URL / routing design #53

Open
sergiimk opened this issue Mar 9, 2024 · 1 comment
Open

Better URL / routing design #53

sergiimk opened this issue Mar 9, 2024 · 1 comment

Comments

@sergiimk
Copy link
Member

sergiimk commented Mar 9, 2024

For kamu-web-ui we designed a nice routing scheme that maximally avoids collisions between /{account}/{dataset} paths and other application endpoints.

As the set of supported protocols grows we are facing the same issue in kamu-node, where endpoints like /query introduce ambiguity with accounts.

We want to get this under control and avoid the chance of collisions.

We should:

  • Consider how important having /{account}/{dataset} as a root-level endpoint is for the node, as perhaps we can achieve this URL brevity and convenience for users through some additional level of indirection that happens under the hood.
  • Introduce major version /v1/ into path for upgradeability
@sergiimk
Copy link
Member Author

sergiimk commented Mar 11, 2024

How about all HTTP-based APIs we separate by /protocol prefix:

  • /graphql
  • /odf/v1/:account/:dataset/blocks/head
  • /odata/v3/$metadata

All other APIs (e.g. FlightSQL) will exist on distinct ports.

To preserve nice concise URLs:

  • User does kamu login frontend.opendatafabric.net
  • Login flow returns node URL as odf+https://node.opendatafabric.net/odf/
  • Node URL is registered as a repo named frontend.opendatafabric.net that resolves to above URL
  • Therefore kamu push my.dataset frontend.opendatafabric.net becomes a push to odf+https://node.opendatafabric.net/odf/my.account/my.dataset/push

It's unclear how to handle kamu pull odf+https://frontend.opendatafabric.net/my.account/my.dataset. This would likely require frontend to understand that ODF protocol is requested and redirect user to the node URL.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant