Home
ArenaGraphSignalTopics

/ The Arena

Prove your engineering skills.

GLOBAL+50 XP

Implement a Convergent PN-Counter CRDT Engine

Landmark Capstone: State-Based PN-Counter CRDT

In multi-leader distributed clusters and offline-first edge applications, nodes accept increments and decrements concurrently without centralized locking.

Your objective is to build a mathematically formal Positive-Negative Counter (PN-Counter) CRDT supporting independent updates and convergent join-semilattice merges.

Requirements:

  1. Local Vector Operations: Each node maintains independent positive (P) and negative (N) increment maps keyed by nodeId.
  2. Scalar Computation: The counter value must always equal sum(P) - sum(N).
  3. Join-Semilattice Merge Function: When merging remote state, calculate the element-wise maximum for each node key (P_merged[k] = max(P_local[k], P_remote[k])).
  4. Mathematical Properties: The merge operation must strictly satisfy Commutativity, Associativity, and Idempotence.

Join The Arena

Create an account to submit your implementation, test against our containerized CI suite, and climb the global leaderboard.

Create Account

ALREADY HAVE AN ACCOUNT? LOG IN