A distributed computer-implemented system for maintaining mentor-group assignment consistency in an online course platform during dropout-triggered group re-computation, the system comprising:
- one or more processors;
- and
- one or more non-transitory computer-readable memories storing instructions that, when executed by the one or more processors, cause the system to provide:
- a course administration service configured to trigger dropout processing for an active course unit;
- a dropout service configured to identify dropout students for the active course unit and generate a dropout payload comprising a course identifier and dropout-student identifiers;
- a student service comprising a student-information data store and a cache layer storing mentor-group assignment data;
- and
- a group formation service comprising a coordination component, a load balancer, and a plurality of replicated group-formation service instances executing on different networked servers, wherein the instructions cause the group formation service to:
- build, before updating the student-information data store, a temporary in-memory hash table keyed by student identifier, entries of the temporary in-memory hash table identifying active students, student status values, and current mentor-group identifiers for the active course unit without persisting a copy of the student-information data store;
- determine, using the dropout payload and the current mentor-group identifiers, affected active-student identifiers for mentor-group assignments subject to re-computation;
- generate, from the temporary in-memory hash table, a plurality of partitioned group-formation work units, each partitioned group-formation work unit comprising a partition identifier, a computation identifier, and a bounded subset of entries from the temporary in-memory hash table corresponding to a different subset of the affected active-student identifiers;
- submit the partitioned group-formation work units to the load balancer;
- route, by the load balancer, different ones of the partitioned group-formation work units to different replicated group-formation service instances according to a load-balancing policy;
- recompute, concurrently by the different replicated group-formation service instances, updated mentor-group assignments for the different subsets according to a predefined mentee-mentor ratio and a dropout redistribution strategy;
- return, from each of the different replicated group-formation service instances to the coordination component, a server-specific partial group-formation result comprising a server-instance identifier, a corresponding partition identifier, and updated mentor-group assignment data generated for the corresponding partitioned group-formation work unit;
- verify, by the coordination component and before updating the student-information data store, completeness of the server-specific partial group-formation results using the partition identifiers and detect duplicate or conflicting student assignments using the affected active-student identifiers;
- assemble, responsive to the completeness being verified and no duplicate or conflicting student assignment being detected, the server-specific partial group-formation results into a recomputed mentor-group assignment set for the active course unit;
- cause the cache layer to set a pending invalidation state for cached mentor-group assignment data corresponding to the affected active-student identifiers before the recomputed mentor-group assignment set is available;
- and
- cause the student service to withhold cached mentor-group assignment data having the pending invalidation state and update the student-information data store with the recomputed mentor-group assignment set.