Validate order book data across multiple databases

Quick Overview

This question evaluates a candidate's competency in designing data-validation and reconciliation systems for financial order books, including defining invariants, ensuring cross-database consistency, and handling edge cases like partial fills, cancels, out-of-order events, duplicates, and replayed messages.

Validate order book data across multiple databases

Company: Jane Street

Role: Software Engineer

Category: System Design

Difficulty: easy

Interview Round: Onsite

Assume your organization stores order book–related data in multiple databases (e.g., one for raw exchange messages, one for normalized orders, one for trades/executions, one for analytics). You suspect data quality issues and want to validate that **all stored data follows order-book logic**. Design a validation approach that answers: 1. What **invariants** must always hold for orders, executions, and the resulting order book? 2. How do you validate **within one database** (table-level constraints, batch checks)? 3. How do you validate **across databases** (reconciliation) when they may be eventually consistent? 4. How do you handle edge cases: partial fills, cancels, replaces, out-of-order events, duplicates, and reconnect replays? Be explicit about what you would compute and compare, and how you’d operationalize it (alerts, dashboards, backfills).

Quick Answer: This question evaluates a candidate's competency in designing data-validation and reconciliation systems for financial order books, including defining invariants, ensuring cross-database consistency, and handling edge cases like partial fills, cancels, out-of-order events, duplicates, and replayed messages.

|Home/System Design/Jane Street
Jane Street logo
Jane Street
Dec 15, 2025, 12:00 AM
easySoftware EngineerOnsiteSystem Design
91
0

Assume your organization stores order book–related data in multiple databases (e.g., one for raw exchange messages, one for normalized orders, one for trades/executions, one for analytics).

You suspect data quality issues and want to validate that all stored data follows order-book logic.

Design a validation approach that answers:

  1. What invariants must always hold for orders, executions, and the resulting order book?
  2. How do you validate within one database (table-level constraints, batch checks)?
  3. How do you validate across databases (reconciliation) when they may be eventually consistent?
  4. How do you handle edge cases: partial fills, cancels, replaces, out-of-order events, duplicates, and reconnect replays?

Be explicit about what you would compute and compare, and how you’d operationalize it (alerts, dashboards, backfills).

Submit Your Answer to Earn 20XP

Sign in to leave a comment

Loading comments...