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

Active Node-Edge N-Distance GraphQL Query #3248

Closed
dwsutherland opened this issue Jul 26, 2019 · 4 comments · Fixed by #3337
Closed

Active Node-Edge N-Distance GraphQL Query #3248

dwsutherland opened this issue Jul 26, 2019 · 4 comments · Fixed by #3337
Assignees
Milestone

Comments

@dwsutherland
Copy link
Member

dwsutherland commented Jul 26, 2019

This is in reference to the desired HYBRID mode noted in the Exeter-June-2019 meeting, and as a solution could present a way of masking the Cylc 8 to 9 backend transition.

To create a query to return that active task/job-edge view:

  • Define a type (or query with fields) whose fields are a node/task-proxy list and list of edges
  • Define query arguments with one filtering on node atts (i.e. active states for current data provision), and another level or distance (i.e. geodesic distance, because level implies a tree?).
  • Create a resolver to collect the selected D0 (distance=0) nodes, then loop on all edges to collect edges and nodes (D1) who are the source or target of D0... Repeat for D1..N

If we think that resolver would be too computationally expensive, then for every node we could store edges that connect to it, as either source or target, in a list field of that node.
(by store I mean the edge IDs of course)

@oliver-sanders
Copy link
Member

oliver-sanders commented Jul 26, 2019

Just to flag something which is kinda tricky with this approach is dealing with graph isolates e.g:

[scheduling]
    cycling mode = integer
    initial cycle point = 1
    [[dependencies]]
        [[[P1]]]
            graph = """
                foo[-P1] => foo => bar => baz
                pub  # graph isolate
            """

@matthewrmshin matthewrmshin added this to the beyond-cylc-8 milestone Jul 26, 2019
@dwsutherland
Copy link
Member Author

Just to flag something which is kinda tricky with this approach is dealing with graph isolates e.g:

[scheduling]
    cycling mode = integer
    initial cycle point = 1
    [[dependencies]]
        [[[P1]]]
            graph = """
                foo[-P1] => foo => bar => baz
                pub  # graph isolate
            """

Yes, could be tricky. Although, if the isolates are active (D0) then they will show up.
Otherwise, they would be identified via the edges, as sources with no target (I think).

@hjoliver
Copy link
Member

Note this mode, if we can do it, hides the back-end "task pool" from users (which is highly desirable). Some of the the nodes displayed will be ghost nodes (no task proxy in the pool) so this requires automatic insertion and should solve/close #2903 and #2143

@hjoliver
Copy link
Member

I believe we are aiming for Cylc 8 here @matthewrmshin!

@hjoliver hjoliver modified the milestones: cylc-9, cylc-8.0.0 Aug 28, 2019
@dwsutherland dwsutherland self-assigned this Aug 29, 2019
@matthewrmshin matthewrmshin modified the milestones: cylc-8.0.0, cylc-8.0a1 Sep 11, 2019
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

Successfully merging a pull request may close this issue.

4 participants