Skip to content
This repository has been archived by the owner on Aug 25, 2020. It is now read-only.

Persist events instead of simulation state #26

Open
fabianishere opened this issue Jul 12, 2018 · 1 comment
Open

Persist events instead of simulation state #26

fabianishere opened this issue Jul 12, 2018 · 1 comment

Comments

@fabianishere
Copy link
Member

fabianishere commented Jul 12, 2018

This issue is concerned with refactoring the OpenDC simulation model to persist events instead of simulation state.

At the moment, at every second in the simulation, the state of machines and task is recorded and written to the database. However, this means that even when a task or machine never changes during the simulation, we do need to record all these states and write them to the database for this entity. This will cause a single simulation to write a huge amount of rows to the database. A benefit of this approach is that getting the state for a single point in time can be accessed quite quickly.

The model should be refactored so it writes events that occur to the database instead of these states. This means that entities that do not have any events associated with them will not occupy space in the database. A downside of this approach is that getting the state for a single point in time requires replaying the events starting from some checkpoint. This change will also require significant changes in the database as well as the current frontend.

See more about Event Sourcing here:

@fabianishere
Copy link
Member Author

This feature will be implemented in the 2.x release.

In addition, we are currently looking into InfluxDB for persisting fine-grained machine and task states.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

1 participant