This article details the architectural design of a high-performance event telemetry and RFID access control engine engineered for large-scale conferences. It focuses on solving challenges like cellular saturation, Wi-Fi packet loss, and high I/O latency by implementing an edge-native architecture with local authentication, distributed locking for resource allocation, and asynchronous telemetry streaming to achieve sub-20ms access verification and real-time spatial analytics.
Read original on Dev.to #systemdesignDesigning an access control system for mega-conferences with over 20,000 delegates presents unique scaling challenges. Traditional cloud-centric authentication models often fail due to network congestion, high latency, and overwhelming database I/O, leading to significant delays and poor user experience at physical entry points. The core problem statement for this system was to achieve sub-20ms local access verification, prevent resource race conditions, and enable real-time spatial telemetry without heavy WAN dependencies.
The solution employs a hybrid edge-cloud architecture. Critical access control logic and data are deployed at the venue's edge (LAN Node), minimizing reliance on external networks for real-time operations. This local processing significantly reduces authentication latency, making the system resilient to WAN outages and local network issues.
Key Edge Components
Each LAN Node at the venue's edge includes an in-memory Access Control List (ACL) using Redis or LMDB for rapid lookups, and a SQLite Write-Ahead Log (WAL) to ensure data durability for ingress logs before asynchronous synchronization to the cloud. RFID gantries, smart turnstiles, and NFC handhelds connect directly to these local brokers.
To achieve microsecond-level access right evaluation, the system avoids traditional SQL lookups for complex multi-tier permissions. Instead, clearance tiers (e.g., General, Exhibitor, VIP, Ministerial) are mapped to 64-bit integer bitmasks. During attendee registration, these credential payloads and clearance masks are pre-warmed into the local edge storage. Access verification then becomes a simple bitwise AND operation, executed extremely fast.
CLEARANCE_FLAGS = {
"GENERAL_ACCESS": 1 << 0, # 00000001
"EXHIBITOR": 1 << 1, # 00000010
"MEDIA_CREW": 1 << 2, # 00000100
"VIP_DELEGATE": 1 << 3, # 00001000
"MINISTERIAL": 1 << 4 # 00010000
}
def verify_spatial_ingress(badge_bitmask: int, zone_required_mask: int) -> bool:
"""Evaluates access rights locally using bitwise AND in under 1 microsecond."""
return (badge_bitmask & zone_required_mask) == zone_required_maskFor managing exclusive resources like VIP meeting suites, distributed locking is crucial to prevent concurrent double-booking. The system utilizes Redis Redlock for atomic allocation, ensuring that even if multiple requests arrive simultaneously, only one is granted access to a specific suite. This prevents race conditions inherent in standard database transactions under high concurrency.
import redis
import uuid
import time
r = redis.Redis(host='10.0.0.10', port=6379, db=0)
def allocate_vip_suite(pod_id: str, booking_window_sec: int = 1800) -> str:
lock_token = str(uuid.uuid4())
lock_acquired = r.set(
f"lock:suite:{pod_id}",
lock_token,
nx=True,
ex=booking_window_sec
)
if not lock_acquired:
raise ResourceConflictError("Suite is currently occupied or reserved.")
return lock_tokenWhile access control is handled locally, spatial telemetry data (attendee movements, dwell times) is asynchronously streamed to a central command and cloud analytics platform. This decoupling ensures that data logging does not impact the critical path of turnstile actuation. Ingress logs are buffered locally and then dispatched to the central system via WebSockets, allowing for near real-time dashboards and analytics without introducing WAN latency to the access process.