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

Phases API in BaseRunModel should be events #556

Closed
jondequinor opened this issue Nov 13, 2019 · 1 comment
Closed

Phases API in BaseRunModel should be events #556

jondequinor opened this issue Nov 13, 2019 · 1 comment

Comments

@jondequinor
Copy link
Contributor

jondequinor commented Nov 13, 2019

For an outside observer, looking at a running BaseRunModel (i.e. the CLI or the GUI), the phases change without the observer ever knowing that it did. So polling is the only way of knowing in what phase some BaseRunModel is at any point in time. Which is bad (e.g. you poll every 1 second, phases changes multiple times within that second—information is lost).

Principally, temporal information should not be stored as mutable data on a shared object.

This is obviously a case that should be solved using a publish/subscribe type programming pattern. Everytime a BaseRunModel derived model (ESMDA, Smoother, etc), changes the phase, it should simply emit an event that the CLI/GUI subscribe to.

@jondequinor
Copy link
Contributor Author

This is most likely going to be a fundamental design goal of #1250 so we can just close this. (AS LONG AS IT IS NOT FORGOTTEN)

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

No branches or pull requests

1 participant