Multiple-choice quizzes do not measure engineering competence. Code reviews do. At Dokkho Tech, we replaced traditional grading with a decentralized peer-to-peer review engine.
The Concurrency Problem
When hundreds of users submit artifacts simultaneously, assigning reviews randomly creates race conditions. Two reviewers might be assigned the same submission, or a submission might be orphaned.
We solved this using Firebase Firestore transactions.
When a user enters the Review Engine, a server-side transaction queries the submissions collection for documents where status == 'pending' and ssignedReviewers < 2. The transaction locks the document, increments the reviewer count, and securely assigns the payload to the active user.
If the user abandons the review, a Cloud Function TTL (Time to Live) index automatically decrements the count after 24 hours, returning the artifact to the pool.
Engineering systems that enforce accountability is complex but strictly necessary.
Top comments (0)