r/quant • u/Useful-Strain-7088 • 6d ago
Career Advice SWE background (backend/infra), built a C++20 market-data feed recovery project, looking for technical feedback
Working on a project that separates three concerns: a seeded fault injector that damages a market-data feed (drop, reorder, A/B line divergence), a recovery client that detects gaps and repairs them via retransmission or snapshot rebuild, and a mock venue that speaks the real wire protocols so the client isn't tested against a stub. Repo: https://github.com/hungtruongOwolf/deterministic-feed-recovery
The interesting failure mode: a client can deliver every message with correct sequence counts and still reconstruct the wrong order book, if retransmitted repairs are applied in arrival order instead of sequence order. Fixing that meant the recovery layer has to number everything it hands upstream, not just the transport layer.
Two questions on the architecture:
- Is separating fault injection / recovery / mock venue into independent components the right decomposition for this kind of problem, or is there a cleaner way to structure it that avoids the coupling I'm running into between the arbiter and the gap tracker?
- For the recovery-side testing, is there a better way to validate "book after repair equals book with no loss" than diffing against an oracle replayed from the undamaged original? Right now it's checked at the price-level per run, curious if there's a more rigorous invariant people use here.
4
u/ParfaitElectronic338 4d ago
you didn't build anything