Design a file sync and sharing service
Company: Salesforce
Role: Software Engineer
Category: System Design
Difficulty: medium
Interview Round: Onsite
## Scenario
Design a cloud file storage, sync, and sharing service similar to a consumer/team drive product.
## Core requirements
- Upload/download files from multiple devices.
- Automatic sync across devices (desktop/mobile).
- Share files/folders with other users via invitations and/or share links.
- Support file version history and restore.
- Handle concurrent edits/conflicts.
## Non-functional requirements
- High durability (no data loss), high availability.
- Efficient bandwidth usage (avoid re-uploading entire large files when small changes occur, if possible).
- Secure: encryption, access control, auditability.
## Deliverable
Propose APIs, data model, storage strategy, sync protocol, and scaling approach.
Quick Answer: This question evaluates system design competency, covering distributed storage architecture, synchronization protocols, conflict resolution and versioning, access control, durability and scalability.