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

Runtime UA with configuration argument #114

Open
vitormsilva opened this issue Sep 29, 2016 · 1 comment
Open

Runtime UA with configuration argument #114

vitormsilva opened this issue Sep 29, 2016 · 1 comment

Comments

@vitormsilva
Copy link
Contributor

Hi, everyone

To make the runtime more accessible and configurable, we have a suggestion to propose.
At this moment, on runtimeUA constructor, we receive 2 arguments, runtimeFactory and the domain. The proposal changes the second argument from a string to an object.
This object will contain the following structure:

{
  "domain": "hybroker.rethink.ptinvocao.pt",
  "runtime-urls": {
    "registry": {
      "prefix": "hyperty-runtime://",
      "suffix": "registry"
    },
    "identity-module": {
      "prefix": "hyperty-runtime://",
      "suffix": "/idm"
    },
    "runtime-ua": {
      "prefix": "hyperty-runtime://",
      "suffix": "/ua"
    },
    "catalogue": {
      "prefix": "hyperty-runtime://",
      "suffix": "/catalogue"
    },
    "graph-connector": {
      "prefix": "hyperty-runtime://",
      "suffix": "/graph"
    },
    "sync-manager": {
      "prefix": "hyperty-runtime://",
      "suffix": "/sm"
    }
  },
  "catalogue-urls": {
    "protocolstub": {
      "prefix": "https://catalogue.",
      "suffix": "/well-known./protocolstub",
      "fallback": "https://catalogue.hybroker.rethink.ptinvocao.pt/well-known./protocolstub/"
    },
    "idp-proxy": {
      "prefix": "https://catalogue.",
      "suffix": "/well-known./idp-proxy",
      "fallback": "https://catalogue.hybroker.rethink.ptinvocao.pt/well-known./idp-proxy/"
    }
  },
  "msg-node-url": {
    "prefix": "domain://msg-node.",
    "suffix": "",
    "hyperty-address-allocation": "/hyperty-address-allocation",
    "object-address-allocation": "/object-address-allocation",
    "subscription-management": "/sm"
  },
  "domain-registry-url": {
    "prefix": "domain://registry.",
    "suffix": ""
  },
  "global-registry-url": "global://registry."
}

With this information, we can construct the URL what we need and are totally configurable.

So, this will need changes to the runtime-browser and runtime-nodejs, because, with this way, the install method will receive an object with all proprieties above referenced.

What do you think about this concept?
Other suggestions are welcome

@pchainho
Copy link
Contributor

The runtime configuration should include how to derive catalogue URLs for legacy endpoints as defined in reTHINK-project/specs#11 (comment).
Ie legacy endpoints are define with "protocol://user@domain" where "domain" is the service provider domain. The standard catalogue URL is derived from it as it is done for any other reTHINK domain while the fallback catalogue URL is derived like: /.well-known/protocolstub/.

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

No branches or pull requests

2 participants