Aaditya Srivastava

Working Proof

Software engineeringChennai, India
Back to selected work

Systems Engineering

ContextOS

What happens when two writers change the same document?

My contribution. I developed this distributed collaborative editor with Codex. The source project is named Docs++.

Local C17 implementation for Windows and Linux. The portfolio walkthrough replays documented scenarios.

Trace architectureLocal project

System architecture

Docs++ / Cluster topology

CLI clientsName serverPrimary storageReplica storage

Authorize

The client asks the name server for access. The name server checks the file permissions and coordinates a short-lived grant with storage.

Client → catalog lookup → storage grant

The editing demo starts with “One. Two.” Alice adds “Zero.” ahead of the first sentence. Bob’s open edit follows its sentence to the new offset. The final read is “Zero. One. Blue Two.” Undo restores “Zero. One. Two.”

How it works

Clients ask the name server for authorization and connect directly to storage. A writer holds a stable sentence ID. When another sentence grows, storage adjusts the byte range before publishing the next edit. The name server coordinates asynchronous replication.

C17 / TCP / pthreads / Winsock / Python

Engineering tradeoff

Readers can use a current replica during a primary outage. Writes still require the primary. The design targets trusted local demonstrations with plaintext TCP and username-based identity.

Verification

I rebuilt the C17 applications from an isolated copy and reran all 43 integration tests on Windows. The repository also records 43 passes on native Linux and 43 under Linux UBSan. The Windows run exercises the documented unavailable response for the optional Linux execution worker.