Skip to content
tezvyn:

Real Time

28 bites tagged Real Time — interview questions with model answers, and 60-second explainers.

Node.js & Express1 min read

How to sync state across multiple user devices?

Attach userId to each socket, track active sockets per user, broadcast user state to all their sockets. multi-device presence and state coherence patterns.

Node.js & Express1 min read

Socket.IO emit methods: socket, io, broadcast differences?

Socket.emit() sends to one client, broadcast.emit() to all except sender, io.emit() to all. Socket.IO API design and message scope understanding.

Node.js & Express1 min read

HTTP request-response versus WebSocket connections?

HTTP is request-initiated, pull-based, client waits for response. WebSocket is persistent, bidirectional, either side sends data anytime. understanding request-response versus persistent bidirectional models.

Python & FastAPI1 min read

WebSocket connection manager and broadcast

A manager class holding a list of active connections, connect accepts and appends, disconnect removes, broadcast iterates sending to each, all wrapped in try/finally to handle disconnects. Managing WebSocket lifecycle and fan-out.

Node.js & Express1 min read

Managing user presence with reconnection grace periods

Rely on heartbeats, apply a grace period before marking offline, reconcile reconnects by user not socket id, use a shared store for multi-instance. robust presence tracking over flaky networks.

Node.js & Express2 min read

The WebSocket Protocol

WebSocket (RFC 6455) is a protocol providing full-duplex, persistent communication over a single TCP connection. It begins as an HTTP request that upgrades, then both client and server can send messages anytime, enabling real-time apps without HTTP's…

MLOps & Infrastructure1 min read

Sub-20ms online feature serving

An in-memory key-value store (Redis) as the online feature store, precomputed features, streaming updates, and offline-online consistency. low-latency feature serving design.

Computer Vision1 min read

How do you speed up a slow detection model?

Quantization, pruning, distillation, lighter backbones, and resolution or batching tweaks, each trading some accuracy or effort for speed. inference optimization techniques.

Computer Vision2 min read

Feature choice for real-time mobile SLAM

Pick ORB for fast FAST keypoints and cheap binary descriptors matched by Hamming distance; accept reduced robustness versus SIFT for real-time, low-power operation. system-level feature trade-offs.

Computer Vision2 min read

SIFT versus SURF versus ORB

SIFT is most accurate but slow with float descriptors; SURF approximates SIFT for speed; ORB is fast, binary, and free, ideal for real-time and embedded. feature-method trade-offs.

UX Research2 min read

Detect a three-action user sequence in real-time at scale

Tests stream processing and stateful pattern matching on unbounded data. A strong design uses a CEP engine with keyed event-time windows, pushes alerts via WebSocket, and trades state-memory for latency.

MLOps & Infrastructure2 min read

Online vs offline feature store architecture and use cases

This tests latency trade-offs between real-time and batch infrastructure. Contrast fast online lookups against batch offline stores; fraud detection maps to online and model training to offline. Red flag: treating them as interchangeable and ignoring latency.

Growth & Experimentation2 min read

How would you design a near real-time social proof notification system?

This tests low-latency event pipeline design with bounded load. A strong answer uses a fire-and-forget beacon, stream processor, and cache with TTL; it favors approximate counts and windowed aggregation.

Content & Copywriting2 min read

Outline the architecture of a Dynamic Creative Optimization system

Tests distributed system design for combinatorial ad optimization. A strong answer maps a creative asset service, combination engine, real-time ad server with A/B testing, performance feedback pipeline, and campaign config UI.

Content & Copywriting2 min read

Architect a real-time multi-armed bandit and compare trade-offs to A/B testing

Sketch a fast arm router, streaming feedback, and model updates; contrast MAB regret minimization with A/B's unbiased estimates. Real-time ML serving and statistical trade-offs.

Computer Vision2 min read

SSD: Real-Time Detection Without Region Proposals

SSD scores default boxes across multiple scales in one forward pass. It runs real-time robotics and mobile vision where two-stage detectors lag. The footgun is ignoring shallow feature maps, which destroys small object accuracy as early layers carry fine…

Analytics & Metrics2 min read

Design a real-time mobile analytics pipeline

Tests decoupling high-volume ingestion from low-latency querying. Strong designs use an event broker, a stream processor for windowed aggregates, and an OLAP database for sub-second dashboards.

Analytics & Metrics2 min read

Design a real-time anomaly detection system for 'add to cart' events

Tests real-time data pipeline design and nuanced anomaly detection. A good answer outlines ingestion (Kinesis), processing (Lambda/Flink), seasonal modeling for 'a drop', and alerting (SNS).

React Native2 min read

WebSockets: A Persistent, Two-Way Connection

Think of a WebSocket as a dedicated phone line to a server, keeping the connection open for two-way conversation. It's ideal for real-time features like live chat or streaming stock tickers.

Node.js & Express2 min read

Server-Sent Events (SSE): One-Way Data Push from Server

Server-Sent Events (SSE) push data from server to client over one HTTP connection. It's a simpler, one-way alternative to WebSockets for things like live news feeds or status updates.

Node.js & Express2 min read

Socket.IO Rooms: Broadcasting to Subsets of Clients

Think of Socket.IO Rooms as server-side channels for grouping clients. They let you broadcast messages to a specific subset, like a private chat or users following a topic. Remember rooms are a server-only concept; a client can't see which rooms it has joined.

Node.js & Express2 min read

Socket.IO: Broadcasting Events to Clients

Broadcasting sends a server-side event to multiple clients at once, like a public announcement system. Use it for live notifications or game state updates. The footgun: by default, it only reaches clients on the same server; use an adapter for multi-server…

Node.js & Express2 min read

Socket.IO: Emitting and Handling Events

Socket.IO events are named messages sent between a client and server. One side `emit`s a message, the other listens with `on`. This powers real-time apps like chat. The footgun: don't `JSON.stringify` objects; Socket.IO does it for you.

Node.js & Express2 min read

Socket.IO: More Than Just WebSockets

Socket.IO is a library that guarantees real-time, bidirectional communication. It automatically picks the best transport—WebSocket or HTTP long-polling—to ensure your connection works. Use it for chat apps or live dashboards.

Get Real Time bites daily.

Five a day, five minutes, offline. With quizzes so it sticks.

Open testing — you’ll join as an early tester.