01 / DATA MODEL
One record per edit.
Saving a whole edit list made the last save win and could lose work across tabs. Individual records and transactions protect each action; development needed a replica set to support transactions.
SCIENTIFIC KNOWLEDGE GRAPH
A review system for scientific graph edits. Researchers propose changes together, and nothing reaches live data until it is checked, reviewed, and merged safely.
↓THE TENSION
Researchers needed to change a shared scientific graph without making unreviewed work visible—or quietly overwriting each other.
Direct writes make a bad edit live before anyone can review it. Concurrent edits are just as risky: by the time a proposal is ready, another researcher may have changed the same entity. Connected nodes and edges make mistakes harder to contain.
Submission workflow
Founding Engineer
Distributed systems · Data integrity · Product
THE IDEA THAT SHAPED THE SYSTEM
I built a submission workflow that keeps proposed changes separate from the canonical graph. Researchers draft and review a precise set of edits, check them against current data, and only then merge the approved changes as a unit.
A submission moves through review, conflict detection, and an atomic merge before downstream systems catch up. Select each step to explore.
DRAFT → OPEN → REVIEW → CHECK → MERGE → SYNC
An author edits on the canvas. Each action is saved as its own record in a database transaction; the draft is visible only to its author.
The live graph stays untouched while the proposal takes shape.
The choices that mattered most, and the problem each one addressed.
01 / DATA MODEL
Saving a whole edit list made the last save win and could lose work across tabs. Individual records and transactions protect each action; development needed a replica set to support transactions.
02 / CONCURRENCY
A first-touch snapshot provides the baseline. Comparing it with the proposed and live values catches meaningful field-level conflicts, at the cost of storing snapshots and batching live reads.
03 / INTEGRITY
The check is stricter than the merge’s underlying writes. I removed retry-and-replay behavior that treated existing or missing entities as success and could falsely report a completed merge.
04 / TRANSACTIONS
All edits land in one graph transaction. Submissions are capped at 200 items to bound transaction size and reduce timeout risk; the limit can be revisited deliberately.
05 / CONCURRENCY
Edits, deletion, and reverting are blocked while a merge is queued or running. A 15-minute expiry prevents a lost message from leaving the submission locked indefinitely.
06 / RETRIES
A timeout can hide a successful commit. A receipt written in the same transaction lets a retry recognize that earlier success instead of applying it twice or reporting a false failure.
The happy path is only part of the design. The system also needs clear signals when a change cannot safely move forward.
ENGINEERING DEEP DIVE
Two examples show how the workflow reasons about concurrent changes and uncertain outcomes. Values and timings below are illustrative.
The baseline is captured when the author first touches an entity. At check time, the proposed value is compared with both that snapshot and the live graph.
EXAMPLE / ENTITY LABEL
What the author started from
The author’s intended edit
Another edit reached the graph
Conflict: both the proposed and live values differ from the baseline and from each other. The merge is blocked for review.
If the live value still matched the baseline, this field would not have that concurrent-edit conflict. Other validation and integrity checks could still block the submission.
A timeout does not say whether a transaction failed or its response was lost. The receipt gives a retry evidence of a committed merge.
Graph changes and the merge receipt are written in the same transaction.
The transaction commits, but the worker does not receive the response.
The worker checks for the receipt before attempting the merge again.
The receipt identifies the previous success, so its writes are not repeated.
The receipt covers the graph transaction. Search and vector updates happen asynchronously and rely on reconciliation when delivery or processing fails.
issue types across five groups
The security review found drafts visible to other users and checks that crossed organization boundaries. I fixed both, reinforcing that access rules are as important as a correct merge.
Authors can resolve a conflict on an open submission without returning to Draft. The current flow does not require them to acknowledge the new live value; I kept resolution simple until user feedback shows a need for that extra step.
The lock expires after 15 minutes. A merge that runs beyond that window needs careful handling; expiry alone is not a guarantee against overlap.
Researchers can work in private drafts, reviewers can see and discuss the exact changes, and approved submissions have a controlled path to the live graph. The hard work was making timeouts, retries, and concurrent edits visible in the design.
Search and vector updates are asynchronous; reconciliation helps bring downstream systems back into sync.