Offline-first playlist sync

DesignHard45 minSpotify style

Your task

Design the cross-device 'liked songs' / playlist-membership set for a music service where a user adds and removes tracks from their library on phone, desktop, and car simultaneously, often offline. Two devices can concurrently add the same track and concurrently one adds while another removes it; the merged result must be intuitive (an add concurrent with a remove should keep the track, not silently drop it) and must converge across all devices with no central lock. Scale: 600M users, a power user has 50k liked tracks, devices reconnect after hours offline. Choose the replicated set type, define the add/remove semantics precisely, and explain how you keep metadata (tombstones/tags) from growing without bound.

It covers

  • Crdt
  • Or set
  • Active active