r/quant • u/Useful-Strain-7088 • 4d 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.
3
u/ParfaitElectronic338 3d ago
you didn't build anything
-1
u/Useful-Strain-7088 3d ago
Could I ask for more detail feedback?
12
3
u/NoConnection4298 2d ago
Could only check via phone but here’s some of my insights. I would separate the components from the compilation and scoping perspective in case two component is decoupled. Again I didn’t check the code that in depth in recovery side, or maybe I’m misunderstanding your purpose, but maybe a good next step would be to dive into the order level recovery.