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

[5pt;8pt] graph-prototype: Implement Non-locking Runtime Graph Modifications #118

Closed
ivan-cukic opened this issue Jul 14, 2023 · 2 comments · Fixed by #377
Closed

[5pt;8pt] graph-prototype: Implement Non-locking Runtime Graph Modifications #118

ivan-cukic opened this issue Jul 14, 2023 · 2 comments · Fixed by #377
Assignees

Comments

@ivan-cukic
Copy link
Contributor

ivan-cukic commented Jul 14, 2023

In the current design of the graph-prototype, modifications to the graph structure require a stop-modify-restart sequence for consistency, ensuring data isn't processed during these changes. This tightly couples the graph (directed graph with all processing nodes, functions, settings, and connections) and its operation to the view. The issue is particularly problematic when attempting to adjust the graph's topology or perform non-UI-triggered settings updates.

The ideal system would allow for asynchronous notifications of changes within the graph to any associated views. Correspondingly, views should be able to request modifications to the graph asynchronously rather than executing them directly. This approach would facilitate non-locking runtime changes to the graph without necessitating a complete halt of the system.

While comprehensive modifications will require a pause or complete stop to ensure the system's integrity, we aim to allow for on-the-fly changes, especially in simple sub-graphs with one input-output relationship. More complex graph topology changes would remain an exception that still likely always require a full stop and restart of the processing engine.

We should investigate a message-passing system for this feature, where the graph is owned and managed by a scheduler. The scheduler would receive and execute modification requests when most appropriate, minimizing the need for mutexes in the processing hot path and delegating some of the stop-modify-resume logic to itself.

This feature could potentially become very complex, and we should initially aim for a MVP solution that introduces non-locking runtime changes to the system.

To note: this would be a new feature that even the present GR 3.X and 4.0 does not support yet.

@RalphSteinhagen RalphSteinhagen changed the title graph-prototype: Non-locking communication of Graph and the outside world [] graph-prototype: Implement Non-locking Runtime Graph Modifications Jul 15, 2023
@RalphSteinhagen RalphSteinhagen changed the title [] graph-prototype: Implement Non-locking Runtime Graph Modifications [5pt] graph-prototype: Implement Non-locking Runtime Graph Modifications Jul 21, 2023
@ivan-cukic ivan-cukic self-assigned this Jun 1, 2024
@ivan-cukic
Copy link
Contributor Author

ivan-cukic commented Jun 1, 2024

Notes from meeting 31.5.

  • Introduce separate compile-time options for building without plugin loader and plugin registry
  • Add API to Graph to instantiate blocks from block name, type parameter name and a property map which uses the plugin loader / block registry
  • Add message-based modifications of the graph:
    • adding blocks, removing blocks, replacing blocks
    • adding connections/edges, removing connections/edges
  • Add message-based graph queries - getting blocks, edges
  • All changes should use the messaging system to notify the listeners of graph topology changes

@ivan-cukic
Copy link
Contributor Author

First part #357

@ivan-cukic ivan-cukic linked a pull request Jul 22, 2024 that will close this issue
@ivan-cukic ivan-cukic changed the title [5pt] graph-prototype: Implement Non-locking Runtime Graph Modifications [5pt;8pt] graph-prototype: Implement Non-locking Runtime Graph Modifications Jul 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: QA-Accepted/Merged (∞)
Development

Successfully merging a pull request may close this issue.

2 participants