Geo: Versioning state machines and events
Context
In Geo, we have state machines to track a registry's latest replication and verification through the following attributes in the tracking database: state
and verification_state
, respectively.
In some cases, we would like to track the history of a registry to recognize race conditions, error patterns, or invalid transitions that occur at some specific point in time without looking deeper into logs.
A benefit of versioning and keeping those milestones saved in the database is that we can query those versions and surface them to the UI eventually, so it gets easier to check where in the whole process of replication or verification the registry failed and why.
Proposal
There are a lot of solutions for versioning models. Here are just a few examples:
- Paper trail (ruby gem)
- Audited (ruby gem)
- Custom versioning system (implementation example)
Concerns
- Scalability and performance. Should we limit the versions to
updates
only? Should we limit the versions to a number? - Database. Are there any concerns about adding more write operations in the database? Should we clean old records after some time?
- Is this really useful?
Edited by Javiera Tapia