← Salesforce Interview Insights

Salesforce·Machine Learning Engineer·Onsite - System Design / Architecture·Senior

Senior
Apr 2026

Summary

System design round at Salesforce for an ML Engineer role, which felt a bit odd given the topic was basically a Google Sheets clone. The question was dense and covered a lot of ground, from concurrency to storage to permissions, and I felt like I was constantly triaging what to go deep on versus skim.

Questions Asked (1)

Q1

Design a web-based collaborative spreadsheet service like Google Sheets. Cover backend architecture, data models for workbooks, sheets, cells, and formulas, concurrency control for simultaneous editors, autosave, version history, snapshots, permissions, and the trade-offs between different storage and sync approaches.

System DesignData ModelingTechnical Trade-offs
Author's notes

This one sprawled fast.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Start by clarifying requirements and scale, then propose a high-level architecture that separates real-time collaboration from durable storage. Dive into data models for workbooks, sheets, cells, and formulas, and explain concurrency control using OT or CRDTs. Finally, discuss trade-offs in storage, sync, versioning, and permissions, tying choices to scalability and consistency needs.

Pro tip: Emphasize that the choice between OT and CRDTs depends on latency, offline support, and complexity; for a Google Sheets-like service, a hybrid approach with server-side OT for online editing and CRDTs for offline may be optimal. Also, mention that formula evaluation should be incremental and dependency-aware to avoid full recalculation.

1. Clarify Requirements and Scale

Ask about expected number of concurrent editors per sheet, total users, offline support, and consistency requirements. Define functional and non-functional goals to guide design decisions.

2. High-Level Architecture

Outline components: client apps, real-time collaboration service (WebSocket servers), API gateway, storage layer (document store, relational DB, or blob storage), and background workers for snapshots and versioning.

3. Data Models and Formula Handling

Design schemas for workbooks, sheets, cells, and formulas. Discuss sparse vs dense storage, formula representation (AST), and dependency graphs for efficient recalculation.

4. Concurrency Control and Sync

Compare OT and CRDTs for real-time collaboration, explaining how to handle conflicts, offline edits, and eventual consistency. Describe autosave and sync protocols.

5. Versioning, Permissions, and Trade-offs

Explain version history using snapshots and deltas, permission models (ACLs, RBAC), and trade-offs between storage options (e.g., SQL vs NoSQL), sync approaches (push vs pull), and consistency models.

Key Points to Mention

  • Data model: workbooks contain sheets, sheets contain cells; cells store values and formulas; formulas parsed into ASTs with dependency tracking.
  • Concurrency control: Operational Transformation (OT) vs Conflict-free Replicated Data Types (CRDTs); trade-offs in latency, offline support, and implementation complexity.
  • Autosave and sync: debounced client updates, WebSocket for real-time, periodic snapshots to durable storage, and conflict resolution strategies.
  • Version history: snapshots at intervals plus deltas for granularity; efficient storage using copy-on-write or log-structured merge trees.
  • Permissions: fine-grained access control (view, comment, edit) at workbook/sheet/cell level; integration with identity providers and sharing links.
  • Storage trade-offs: relational DB for strong consistency vs NoSQL for scalability; in-memory for active sheets vs persistent storage; caching strategies.

AI-generated suggestions, not part of the candidate's original notes. May be inaccurate — verify before relying on them.