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

Persist events instead of simulation state #26

@fabianishere

Description

@fabianishere

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:

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions