Data Scientist at Zip Co at almaBetter
We all have used DropBox once in a while, without actually knowing how the system works. This blog will cover all the insights related to the different functional requirements as well as the system design of DropBox. So let's start learning...
Before starting I would like to thank Shweta singh,Keerthana for their support and the constant research they have been doing on this topic.
Dropbox is a cloud file storage device. It enables users to share the files across their devices and also with remote storage servers. It does that by allowing the users to create special folders on each of their computers or mobile devices, which the service then synchronizes so that it appears to be the same folder regardless of which computer is used to view it. Files placed in this folder also are typically accessible through a website and mobile apps and can be easily shared with other users for viewing or collaboration.
These are the table of contents that will be followed throughout the blog:
The above flowchart describes the entire architecture of dropbox starting from the client-side, passing through the cloud server, and the several services that are provided by the DropBox services.
The reason for such a huge increase in the revenue of DropBox is because of the application of ML algorithms. They had a clear vision of their problem statement where they wanted to have a broader user base, and in turn, increase revenue. They used clustering algorithms to segment different user groups together, and provided benefits to users having less likelihood of using DropBox.
Goals of a DropBox System:
Given below are the several goals/objectives that are taken into consideration before designing the DropBox system UI:
The basic system behavior can be defined by the Functional Requirements. These are what the system does, or focuses on doing. In the simplest of terms, these requirements need to be met, if we want a proper functioning of our system.
As we learned in the previous section that functional requirements are those requirements that are required for an optimized performance of the system, whereas non-functional requirements specify the approach of the system to deal with functional requirements. They don’t affect the functionality of the system, even if they are not met, the system will still perform its basic operations.
What is the ACID system in DropBox Design?
Whenever we deal with system designs in a cloud storage platform, the concept of ACID is extremely important. ACID is made up of four independent functionalities including Atomicity, Consistency, Isolation, and Durability. Let’s get an idea of these four functionalities and what they represent.
Atomicity: One of the properties of a cloud storage platform like dropbox is this if a file is changed from one version to a different one, that file is replicated/updated in all the other devices as well. Suppose the user is trying to access the updated file from a different device. The files get updated in the form of ‘chunks’, so the user trying to access the file from a different device may see the file getting updated in a transient way (that is in the form of chunks). The user should not see all the changes appearing in the form of chunks. To counter this, all the chunks in the user’s dropbox application are stored in a temporary file in a temporary location, where all the changes are first applied. After all the changes are applied to the file, we can link the actual file with the temporary file.
Consistency: This functionality means users should not be able to read files that don’t make sense together. If a user has updated a file in one device, the second user operating on a different device should not see a partial change in that file. The system may crash if the second user tries to operate/modify that partially updated file.
Isolation: In terms of DropBox service, this means that two different files having been dealt with differently by the user, should be totally independent of one another. Changing or modifying one file should not modify a different file. Secondly, if a file gets updated on multiple devices at the same time, one file will have to wait for the other write to complete first.
Durability: Changes made to a file will not get lost. If a file has been created and then modified based on the choices of the user, and that file has been updated to the remote server, these changes should not be lost. This is one of the best advantages of cloud storage services, where changes are preserved.
In the next section we will be looking at some of the basic design APIs that DropBox uses:
API stands for Application Programming Interface. It acts as a medium through which two or more applications connect with each other. It acts as a messenger that delivers the request of a user to the application where the user is requesting information, and delivers the response back to the user. Different design APIs for Dropbox is as follows:
Overall Architecture of DropBox:
Given below is the entire architecture of DropBox where the box on the left signifies the operations on the client-side, and that to the right are all the services that DropBox provides.
Read our recent blog on "System Design of Google Maps"