hardik jain / selected engineeringsync field notes, 01
01the moment

one tap.a whole system.

a runner arrives. a volunteer checks them in. beneath that small moment, five phones are learning the same story.

↳a race-day check-in, seen from the inside.

built at fitpage · offline-first race-day check-ins

designed for an imperfect race day.

multiple volunteers. multiple phones. unreliable internet. i built the check-in system so a volunteer can keep working locally, while phones exchange updates over the venue’s Wi-Fi.

keep the line moving.
a scan is recorded on the phone before it is shared. the local operation log provides the history used to build the check-in state.
recover what was missed.
UDP messages get acknowledgments and retries. peers also compare version vectors and exchange missing operations, so a temporary disconnection need not leave a permanent gap.
resolve the same history consistently.
hybrid logical clocks order events beyond their arrival time. a shared projection rule derives the check-in state from those operations.
a closer look at the ordering

a hybrid logical clock combines physical time with a logical counter. after observing an event, a phone can stamp a subsequent correction after it, even if its own wall clock is behind. that preserves observed ordering; it does not discover the true real-world order of independent events.

each device also tracks the highest contiguous operation sequence it holds from each origin. comparing those version vectors identifies gaps without needing to resend the whole history.

the animation is a simplified explanation of the architecture, not a live network simulation or a performance measurement.

more about my work at fitpage →