Skip to content

Conversation

johannesduesing
Copy link
Contributor

Reason for this PR
The re-design of the Delphi management UI uncovered the need for additional data and functionality provided by the registry. This included:

  • A representation of "Links" between instances, meaning which instance is assigned to which other instance, as well as a "State" of this link (Assigned, Failed, ..)
  • The possibility to assign a new instance as dependency to other instances
  • The possibility to assign generic labels to instances
  • The possibility to retrieve the whole Graph of the instance network

Solution
Add "InstanceLinks" to the data model, require the additional data to create links in the API endpoints, add labels to the data model of the "Instance". Provide endpoints to retrieve links. Provide endpoints to assign labels.

Changes

  • InstanceLink.scala has been added to the core model.
  • The API endpoints /matchingInstance and /matchingResult now require an additional parameter specifying the id of the calling instance
  • The endpoint /assignInstance has been introduced. It provides a way to assign a new dependency to an instance
  • Added attributes labels: List[String] to instances. (This is an API breaking change, therefore all components will be updated as well.)
  • Provided endpoint /addLabel
  • Changed matching algorithm, which now has three phases:
    1. Look for links from the calling instance to instances of the requested type with state 'Assigned'. If any are found match, else goto phase 2
    2. Look for instances of the requested type that share labels with the calling instance, select the one with the most labels in common. If none exist, goto phase 3
    3. Look for instances of the requested type that have the most positive matching results in a row. Match to this instance (may have 0 positive results). If no instance of the specified type is present, fail matching process.
  • Introduced events associated with links: LinkStateChangedEvent and LinkAddedEvent
  • Added endpoint /instance to retrieve an instance by id

Johannes Duesing added 15 commits November 1, 2018 19:01
…oint. Extended /matchingInstance and /matchingResult with parameter 'Id' to pass the id of the calling instance. Changed specification, server and request handler accordingly. No db changes yet.
…o. Connected them to the RequestHandler. Still need to evaluate links in matching algorithm.
Still need to implement fallback algorithm and update the tests.
… matching does not yield result. Stop is now able to call /stop on instances that are not running inside a docker container.
LinkAddedEvent and LinkStateChangedEvent added. Fixed tests not compiling due to api change.
…?Id=42). Whole network is now accessible (new type InstanceNetwork) via /network.
… Added hint in Requirements section of readme.
… now provides an endpoint to add labels to an instance. Label length is limited to a maximum number of 50 characters (may be adapted in configuration file).
…ing. Adapted RequestHandlerTest to new feautures. Fixed a bug in requesthandler.
Logs will be provided in a separate branch.
@johannesduesing johannesduesing added the enhancement New feature or request label Nov 8, 2018
@johannesduesing johannesduesing self-assigned this Nov 8, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants