-
Notifications
You must be signed in to change notification settings - Fork 33
[Utility][Persistence][Savepoints/Rollbacks] Refactor UtilityContext into UtilityUnitOfWork #563
Copy link
Copy link
Closed
Labels
persistencePersistence specific changesPersistence specific changesutilityUtility specific changesUtility specific changes
Milestone
Description
Objective
Create the logical abstraction that would represent the "Unit Of Work" (inspired by Martin Fowler's work in his "Patterns of Enterprise Application Architecture")
These abstraction should have specific implementations for Leader and for Replica nodes in order to allow a clean separation of concerns while keeping a degree of composability/reusability of the code. (Lower level requirement discovered while working on #508)
Origin Document
This is part of a rescoping of the tickets related to SavePoints, Rollbacks and it originates essentially from the following tickets:
- [Core] Create design document for save points and rollbacks #493
- [Persistence][Utility] Separate all CreateAndApply functions into more functional components #508
Goals
- Refactor
UtilityContextto be a polymorphicUtilityOfWork - Introduce
LeaderUtilityUnitOfWorkandReplicaUtilityUnitOfWorkthat expose the methods that are going be to used depending on the "role" of the node in the consensus process applying the SOLID principles.
Deliverable
- Refactored
UtilityOfWork -
LeaderUtilityUnitOfWorkandReplicaUtilityUnitOfWorkimplementations - Logical switch/factory method to use the correct UOW (Unit Of Work) depending on the node's role
Non-goals / Non-deliverables
- Changes in logic (at this point, the code should be functionally equivalent to the previous implementation)
General issue deliverables
- Update the appropriate CHANGELOG(s)
- Update any relevant local/global README(s)
- Update relevant source code tree explanations
- Add or update any relevant or supporting mermaid diagrams
Testing Methodology
- Task specific tests or benchmarks:
make ... - New tests or benchmarks:
make ... - All tests:
make test_all - LocalNet: verify a
LocalNetis still functioning correctly by following the instructions at docs/development/README.md
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
persistencePersistence specific changesPersistence specific changesutilityUtility specific changesUtility specific changes
Type
Projects
Status
Done