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

Should HTTP end point URL contain local/remote address (for LIP-1 and beyond) ? #85

Closed
longbowlu opened this issue Nov 17, 2020 · 3 comments

Comments

@longbowlu
Copy link
Contributor

longbowlu commented Nov 17, 2020

HTTP end point in LIP-1 specifies that HTTP urls has the following format:

https://<hostname>:<port>/<protocol_version>/<LocalVASPAddress>/<RemoteVASPAddress>/command

It has been causing some confusion of what LocalVASPAddress and RemoteVASPAddress means and it is sort of easy to mix them up. As this URL will also be used in other off chain related LIPs, it's worth discussing whether we want to keep them in the URL.

Pros:

  1. easier (VASPs/DDs) for users to do load balancing: users can forward the request to right tiers according to from address and/or to address. Without this, users need to parse the JWS message to get these info.

Cons:

  1. easy to mistake one with the other
  2. makes the URL longer

I also think it's worthwhile discussing whether we put protocol_version in the front or rear (i.e. after command). Because as we add protocols in the future, more keywords will be introduced (e.g. pay in Libra ID). Logically we want them each to have a version (easier for iterating).

cc @kphfb , @gdanezis , @xli , @sunmilee , @andll , @bmaurer

@longbowlu longbowlu changed the title Should HTTP end point contain local/remote address (for LIP-1 and beyond) ? Should HTTP end point URL contain local/remote address (for LIP-1 and beyond) ? Nov 17, 2020
@andll
Copy link
Contributor

andll commented Nov 17, 2020

To be honest I don't buy point 1 - I don't understand how would VASP/DD do load balancing based on to/from and why would they do that

Additionally, I am not sure why do we need LocalVASPAddress - don't VASP know who they are?

I think for the version general guideline should be having it as early as possible (ideally first part of the path part of the URL)
Reason for this is quite simple - maybe in some future version we will decide to change this Local/remote/command part, so it would be easier to reason about if version goes first.

@kphfb
Copy link
Contributor

kphfb commented Nov 17, 2020

I agree with removing it also. Version early also makes sense. Let's make it happen

@longbowlu
Copy link
Contributor Author

Closing this as we agreed to remove addresses in url and placing version early.

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

3 participants