feat: implement multi-region active-active deployment with CRDTs, HLC, and geo-replication (issue #264) - #273
Merged
levibliz merged 5 commits intoAug 23, 2026
Conversation
…, and geo-replication - Add MultiRegionCoordinator class for cross-region coordination - Implement CRDTs: ORSet (room membership), RGASequence (message ordering), LWWMap (session state), LWWElementSet (geofences) - Implement Hybrid Logical Clocks (HLC) for causal ordering across regions - Implement vector clocks for session state conflict resolution - Implement Merkle tree anti-entropy for divergence detection and repair - Implement data residency enforcement at replication layer - Implement quorum writes for critical metadata (geofences, global config) - Implement region health monitoring and failover target selection - Add comprehensive test suite (91 tests) covering CRDT convergence, HLC ordering, failover, data residency, and integration scenarios Closes RiftCore00#264 Closes RiftCore00#264 Closes RiftCore00#264 Closes RiftCore00#264
levibliz
reviewed
Aug 22, 2026
levibliz
left a comment
Contributor
There was a problem hiding this comment.
Ensure the CI/CD Passes
… constants) - Remove duplicate tokenRefreshSchema in validator.js - Remove duplicate SessionManager import in server.js - Remove unused DEFAULT_* constants in room-manager.js
levibliz
approved these changes
Aug 22, 2026
- Add missing constants (MIGRATE_PATH, PROTOCOL_VERSION, etc.) - Add missing variable declarations (localSessions, sessionTtl, ownsSessions, etc.) - Fix duplicate functions (safeSend, markShuttingDown) - Fix undefined variables (server -> httpServer, ctx scope) - Update eslint config to ignore unused vars starting with _ - Fix renderMetrics usage
…, and geo-replication - Add MultiRegionCoordinator class for cross-region coordination - Implement CRDTs: ORSet (room membership), RGASequence (message ordering), LWWMap (session state), LWWElementSet (geofences) - Implement Hybrid Logical Clocks (HLC) for causal ordering across regions - Implement vector clocks for session state conflict resolution - Implement Merkle tree anti-entropy for divergence detection and repair - Implement data residency enforcement at replication layer - Implement quorum writes for critical metadata (geofences, global config) - Implement region health monitoring and failover target selection - Add comprehensive test suite (91 tests) covering CRDT convergence, HLC ordering, failover, data residency, and integration scenarios fix: resolve pre-existing lint issues and server.js bugs - Remove duplicate tokenRefreshSchema in validator.js - Remove duplicate SessionManager import in server.js - Remove unused DEFAULT_* constants in room-manager.js - Fix SessionManager optional creation (opt-in session resumption) - Fix server.js close handling for proper shutdown Closes RiftCore00#264 Closes RiftCore00#264 Closes RiftCore00#264 Closes RiftCore00#264
11 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Implements multi-region active-active deployment with conflict-free geo-replication, cross-region failover, and eventual consistency for global fleet operations.
Changes
New Module:
src/multi-region.jsnow(),receive(),compare()merkleRoot()andstableStringify()vcIncrement,vcMerge,vcCompareKey Features
replication_lag_ms,replication_conflicts_total,crdt_merge_duration_msAcceptance Criteria Verified
Tests
tests/multi-region.test.jscovering:References
Closes #264
Closes #264
Closes #264
Closes #264