Design a platform for exchanging and analyzing sports data with real-time updates, historical data, and privacy controls.
Asked at
AI answer
Components and data flows
- Clients and integrations send data through the API and streaming gateway. Collectors validate the schema, source identity, timestamps, and allowed values; events are sent to the message broker.
- Stream processing normalizes and enriches events, then writes current metrics to a low-latency store and long-term history to a columnar store or lakehouse. The read API handles queries and real-time subscriptions; a separate service manages profiles and privacy.
Model and scaling
Each event contains a type, subject, source, event time and ingestion time, schema version, and deduplication identifier. Partition the stream by subject or competition, and retain raw events for reprocessing. Handle late-arriving events using event time and define rules for correcting aggregates. Use idempotency for redelivery; do not promise exactly-once delivery without specifying a concrete mechanism and the boundaries of the guarantee.
Privacy and operations
Consent and visibility are defined separately for the user, dataset, and purpose of use. Check access and filter fields before returning data; support data export and deletion, and minimize collection and retention periods. Pseudonymization does not replace access control. Encrypt traffic and storage, and audit access. Monitor event-to-API latency, queue lag, data loss, and duplicates. Plan for broker and storage redundancy, replay from raw events, quotas, and graceful degradation: during overload, preserve ingestion of critical events while temporarily updating aggregates with a delay.
Also asked at Andersen
- Which company did you work for and what projects did you handle?
- How do you work with Linux at the system administration level?
- What databases do you have experience working with?
- How is a container built and run from a Dockerfile?
- How did you deploy the Kubernetes cluster and how did you manage it? What tools did you use for rollout?
Similar questions
- Design a platform for sharing and analyzing data among researchers, with privacy, versioning, and reproducibility.
- Design a platform for exchanging and selling event tickets with protection against scalping and fraud.
- Design a platform for organizing conferences: talks, schedules, tickets, streams, and networking.
- Design a distributed system for managing sports broadcasting rights by region, pricing plan, and duration.
- Design a platform for processing scientific experiments, where data arrives from thousands of instruments and some experiments cannot be repeated.