Uploaded image for project: 'Active and Available Inventory'
  1. Active and Available Inventory
  2. AAI-2437

Optimise ad-hoc retrieval of any resource with any of its cousin relationships



    • Type: Story
    • Status: Closed
    • Priority: Medium
    • Resolution: Won't Do
    • Affects Version/s: None
    • Fix Version/s: Frankfurt Release
    • Labels:


      In the Resource REST API, it takes at least two GET calls to retrieve a resource with its cousin relationships, namely

      1 - GET the resource with depth=1 to parse the relationship-list attributes
      2 - GET the cousin resource once the relationship-list attributes are known
      3 - repeat step 2 for each cousin resource

      Steps 2 and 3 could be optimised by using a Traversal custom query, where all the cousin resources are listed in an array of "start" objects.

      However it would be great if the Traversal custom query could be used to optimise steps 1 and 2 and 3 in a single call. That means only the "start" objects are known but the caller wants the cousin resources to be included automatically in the result as well.

      The Traversal custom queries are currently pre-configured in the "stored-queries.json" file that is deployed in the microservice containers. The existing queries are specifically configured using hard-coded values for the edge traversals, making them highly specific to individual EdgeRules and scenarios.

      Suggestion is to create a new custom query where the class names for the edge traversal are passed in as parameters of the query, so that clients can choose them for ad-hoc queries at run-time. The custom query should include the resource object identified as the "start" objects as well as the cousin objects that are in the relationship-list of the "start" objects.


          Issue Links

          No reviews matched the request. Check your Options in the drop-down menu of this sections header.



              keong Keong Lim
              keong Keong Lim
              0 Vote for this issue
              3 Start watching this issue