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

System graph flavors #38

Closed

Conversation

alice-i-cecile
Copy link
Member

@alice-i-cecile alice-i-cecile commented Oct 20, 2021

RENDERED

This RFC adds more types of basic system-graph constructs, providing the foundations needed by #33, #36 and other higher level scheduling APIs.
In particular, this extends on the existing "strict ordering" of .before by adding:

  1. If-needed ordering constraints, as proposed by @davidscherer in System scheduling bevy#2747, which allow for more efficient many-to-many constraints.
  2. Causal ties, which ensure that plugins are harder to accidentally break by providing a tool to link the run criteria of systems.
  3. At-least-once separation constraints, which are used to specify the exact "cleanup" logic required by command processing, indexes and relations.

I would very much like to move forward with the "automatically run side-effect consuming systems when needed" approach, allowing us to significantly simplify the design by avoiding a painfully complex satisfiability checker and allowing causal ties to be moved to their own RFC. However, I know this is likely to be controversial, so I wanted to get some initial feedback and show the added complexity needed before swapping over.

@alice-i-cecile alice-i-cecile marked this pull request as draft October 20, 2021 19:02
@alice-i-cecile
Copy link
Member Author

What if we added an atomic A.directly_before(B) dependency type? Rule would be:

After A has started running, until B concludes, systems (other than the systems that are directly after A) cannot write to the resources or archetypes that A can read from

Effectively, A doesn't look like it's complete to any system other than the one(s) it is directly before until those also finish

@alice-i-cecile
Copy link
Member Author

Closing in favor of #45, which steals almost all of the ideas from this RFC.

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 this pull request may close these issues.

1 participant