Please enable JavaScript.
Coggle requires JavaScript to display documents.
dropbox (Requirements and Goals of the System (extended requirement…
dropbox
Requirements and Goals of the System
upload/down photo/files
view files
delete files
share files to other user
should be able to save large files
ACID shpud be met for file update
update files
support offline editing
extended requirement
version support for data changes
component design
client
responsibilities
main tasks
Upload and download files.
Detect file changes in the workspace folder
Handle conflict due to offline or concurrent updates.
HTTP long polling for updates
save file in chunks
keep local copy of file metadata
monitors user's workspace folder changes
parts
Internal Metadata Database
to track chunk, version of file in file system
Chunker
chunck/reconstuct file from chunks
download changed chunks from remote
watcher
watch file changes
listen to synchronization service as well for file changes made by other clients
notify indexer about changes
indexer
process events from watcher
update internal metadata db
upload changed chunks to remote
upload metadata to remote
call synchronization service to notify about update
handle slow servers
backoff exponentially
Metadata Database
should store metadata about objects
chunks
files
user
devices
workspace
Synchronization Service
Message Queuing Service
Cloud/Block Storage
Metadata Partitioning
Caching
load balancers
Security, Permissions and File Sharing
Design Considerations
huge write and read
read write ratio same
store files in small chunks
reduce data exchange amout by updating changed chunk only
keeping local copy of file metadata with client can save network badwidth
client can be intelligent. Should send updated shuk only
Capacity constraint
users
500 million
active daily
100 million
devices per user
3
files each user has
200
CONCURRENT CONNECTIONS = 1M
total files
500 * 200 = 100 billion
size
100 b * 10KB = 10 PB
High Level Design
Block servers
to upload/download file
Metadata server
store metadata of files in db
synchronization server
inform client about changes