You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/decisions/0004-refresh-and-consistency-framework.rst
+10-10Lines changed: 10 additions & 10 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -13,7 +13,7 @@ The unified user grouping system needs to maintain consistent and up-to-date gro
13
13
The system must support multiple types of criteria that depend on different data sources:
14
14
15
15
* Real-time data from the LMS (enrollment changes, profile updates)
16
-
* Analytics data from Aspects (engagement metrics, learning progress)
16
+
* Analytics data from Aspects (engagement metrics, learning progress)
17
17
* External system data that may not be immediately available
18
18
19
19
Key challenges include:
@@ -67,7 +67,7 @@ To avoid inconsistent group membership updates (such as out-of-order updates), w
67
67
Given a user group with criteria C1 (last login over 1 week ago) and C2 (residence country in X list of countries):
68
68
69
69
* Event 1: User logs in at t0 (affects C1)
70
-
* Event 2: User changes residence country at t1 (affects C2)
70
+
* Event 2: User changes residence country at t1 (affects C2)
71
71
* Without coordination: Two concurrent processes might evaluate the same user's membership simultaneously, potentially leading to race conditions where the final membership state depends on timing rather than the actual criteria.
72
72
73
73
The coordination mechanism ensures that only one process evaluates a user's group membership at a time, while still allowing concurrent evaluation of different users for optimal performance.
@@ -159,7 +159,7 @@ Complement with Collection-Based Exclusivity
159
159
* **Collection Membership**: Ensure each group belongs to a collection, with a default collection for non-exclusive groups. Collections prevent users from being assigned to multiple groups within the same exclusive collection.
160
160
161
161
* **Hybrid Approach**: The combination of Group Collections + refresh & consistency framework guarantees that a user is never in two groups that are mutually exclusive by nature (contradictory), whether the exclusivity is:
162
-
162
+
163
163
* **Natural/Automatic**: Derived from mutually exclusive criteria (handled by update framework)
164
164
* **Administrative/Manual**: Defined by course staff or admin users (handled by Group Collections)
165
165
@@ -169,11 +169,11 @@ Operational Rules for Exclusivity Domains
169
169
* **Event-Based Domains**: For groups in automatic exclusivity domains with event-based updates, the update framework handles coordination automatically through the centralized orchestrator. For example:
170
170
171
171
* When ``u1`` is enrolled in track "honor" and then gets downgraded to "audit", a single enrollment change event triggers coordinated updates across the mutually exclusive domain:
172
-
172
+
173
173
* Remove ``u1`` from "Honor Students" group
174
174
* Add ``u1`` to "Audit Students" group
175
175
* Both operations happen atomically within one transaction
176
-
176
+
177
177
The domain is automatically formed because "honor" and "audit" enrollment tracks are naturally mutually exclusive - a user cannot be in both simultaneously.
178
178
179
179
* **Non-Event-Based Domains**: For groups with mutually exclusive criteria that cannot be updated by events (whether due to external data sources, missing event implementation, or other constraints), mutual exclusivity is naturally maintained when groups share the same update schedule. For example:
@@ -217,9 +217,9 @@ Dependencies
217
217
218
218
This ADR builds upon and extends the foundational architecture established in previous ADRs:
219
219
220
-
* **Model Foundation Dependency**: The refresh and consistency framework operates on the UserGroup, Criterion, and UserGroupMembership models defined in :doc:`ADR 0002: User Groups Model Foundations <../0002-user-groups-model-foundations>`.
221
-
* **Runtime Architecture Dependency**: The event-based update system utilizes the evaluation engine, orchestration layer, and backend clients defined in :doc:`ADR 0003: Runtime Architecture <../0003-runtime-architecture>`.
222
-
* **Criterion Type Integration**: Event mappings and refresh strategies are defined as part of each criterion type's registration, following the registry-based approach established in ADR 0003.
220
+
* **Model Foundation Dependency**: The refresh and consistency framework operates on the UserGroup, Criterion, and UserGroupMembership models defined in :doc:`0002-user-groups-model-foundations`.
221
+
* **Runtime Architecture Dependency**: The event-based update system utilizes the evaluation engine, orchestration layer, and backend clients defined in :doc:`0003-runtime-architecture`.
222
+
* **Criterion Type Integration**: Event mappings and refresh strategies are defined as part of each criterion type's registration, following the registry-based approach established in :doc:`0003-runtime-architecture`.
223
223
224
224
**Internal Framework Dependencies:**
225
225
@@ -324,7 +324,7 @@ Rejected in favor of whole predicate re-evaluation to maintain simplicity and en
324
324
References
325
325
**********
326
326
327
-
* :doc:`ADR 0002: User Groups Model Foundations <../0002-user-groups-model-foundations>`
* `User Group Consistency and Refresh Framework document <https://openedx.atlassian.net/wiki/spaces/OEPM/pages/4976115715/User+Group+Consistency+and+Refresh+Framework>`_
330
330
* `Long-Term Requirements for the Unified Model <https://openedx.atlassian.net/wiki/spaces/OEPM/pages/4905762858/Long-Term+Requirements+for+the+Unified+Model>`_
0 commit comments