Grokking the System Design Interview
Ask Author
Back to course home

0% completed

Vote For New Content
how would synchronization work if separate clients make changes to the same file...

swe

Mar 24, 2022

how would synchronization work if separate clients make changes to the same file that affect different chunks, but the updated chunks in combination would result in a corrupted file?

Is that possible?

0

0

Comments
Comments
Design Gurus
Design Gurus4 years ago

Yes, it could result in corrupted data. Synchronization is, itself, a complete problem. Let's discuss a little.

Any software engineer who has written code, know, how to merge their code changes to the main codebase. While merging some changes can be automatically merge...

S
swe 4 years ago

thanks for the quick response

H
HelloWorld 3 years ago

IMO allowing for file corruption is a terrible idea. One solution is to keep list of chunks in the file metadata. After successful upload of the file chunks the client updates file metadata with new chunks and deletes old, no longer used chunks. If each chunk is 4mb the...

M
Mike Xu3 years ago

@HelloWorld, I think what @systemdesign means by data corruption is that you lose the non-latest change, rather than that the file is literally corrupted and cannot be used.