Design the SmartThings Event Pipeline That Triggers Home Automations

Last updated: November 29, 2026

Quick Overview

Design the cloud service that ingests device state events from millions of SmartThings hubs and devices (door sensors, thermostats, lights) and evaluates user automation rules, such as turning on the porch light when the door opens after sunset, with low latency.

Samsung
System Design
Software Engineer
Samsung
November 29, 2026
Software Engineer
System Design Round
System Design
Medium

0

0

0 solved


Design the cloud service that ingests device state events from millions of SmartThings hubs and devices (door sensors, thermostats, lights) and evaluates user automation rules, such as turning on the porch light when the door opens after sunset, with low latency.

SmartThings connects devices from many brands, including Matter devices, and users expect an automation to fire within a second or two. The interviewer is checking partitioning by home, rule evaluation design, ordering and idempotency, and what should run locally on the hub.

What the Interviewer Expects
  • Partitions events by location (home) so related state and rules live together
  • Keeps a current device state cache for rules that combine conditions
  • Indexes rules by triggering device and attribute to avoid scanning all rules
  • Handles duplicates and out-of-order events with sequence numbers and idempotent actions
  • Discusses local execution on the hub for latency and offline resilience
Key Topics to Cover
event streaming
rule engines
partitioning
idempotency
IoT
How to Approach This
  1. Start by clarifying functional and non-functional requirements with the interviewer.
  2. Estimate the scale: QPS, storage, bandwidth. This drives your design decisions.
  3. Draw a high-level architecture first, then deep dive into 1-2 critical components.
  4. Discuss trade-offs explicitly (e.g., consistency vs availability, SQL vs NoSQL).
  5. Address failure scenarios, monitoring, and how the system handles 10x traffic spikes.
Possible Follow-up Questions
  • How do you handle time-based triggers like sunset across time zones at scale?
  • Two rules fire conflicting actions on the same light. What do you do?
  • How would you let third-party cloud devices participate with webhooks?
Sharpen Your Skills on Codemia

Practice similar problems with our interactive workspace, get AI feedback, and track your progress.

Practice System Design Problems
Sample Answer
Requirements

Functional: ingest device events, evaluate rules (trigger plus conditions plus actions), send commands back to devices, show history. Non-functional: tens of millions of devices, peaks of a few hundre...

High-Level Design

Hubs and cloud-connected devices publish over MQTT or WebSocket to an ingestion gateway, which writes to a log (Kafka-style) keyed by location_id. Rule workers consume partitions; each holds the locat...


Submit Your Answer
Markdown supported

Related Questions