0 views
Design a system for managing access to a sports complex, with memberships and offline access control.
Asked at
AI answer
I would divide the system into subscription management and a fast path for turnstile checks.
- Services: an API and administrative interface for customers, plans, and subscriptions; an access service to check entry privileges; and integrations for payments and notifications.
- Data: subscription, validity period, zone and time restrictions, suspension status, and pass ID. Changes are recorded in an audit log. Use a transactional database and idempotent commands for concurrent operations.
- Access control: the reader sends the pass ID and access point to a local controller. The controller checks a signed local cache of rules and validity periods, opens the turnstile, and records the event. When connectivity is restored, events are synchronized with the server, with deduplication.
- Offline mode: synchronize the minimum required data in advance, define how long it remains valid, and set rules for unknown or recently revoked passes. Choose fail-closed for sensitive areas; for ordinary entry, use an explicitly agreed availability policy. Limit how long the system can operate autonomously and alert the operator when connectivity is lost.
- Security and operations: secure communications and key storage, minimize personal data, use role-based access, maintain logs, provide server redundancy, and monitor check latency, synchronization errors, and controller status.
I would test scenarios involving subscription expiration and revocation, repeated presentation of a pass, network outages, controller restarts, and connectivity recovery.
Also asked at Альфа-Банк
- Which company did you work for and what projects did you handle?
- Tell us about your experience deploying and operating Kubernetes clusters.
- Tell us about your professional experience: what have you done and how have you grown professionally?
- Do you have any questions for the company or about the process?
- What programming languages are you familiar with and do you use them for scripting?
Similar questions
- Design a system for managing access to office buildings, including guests, parking, and calendar integrations.
- Design a distributed system for managing access to parking facilities with subscriptions, one-time visits, and offline terminals.
- Design an access control system for buildings serving 1 million employees and 50,000 doors, with offline operation and instant badge revocation.
- Design a system for managing access to a warehouse, with zones, roles, and an audit of every operation.
- Design a system for managing access to laboratories, including equipment, training, bookings, and incidents.