Friday, November 9, 2012

Object Oriented design for a cloud based file storage system like SkyDrive

Object Oriented design for a cloud based file storage system like SkyDrive


The typical characteristics/requirements of a cloud storage system:
1) They are essentially file hosting services
2) Allow users to register/sign in
3) Allow registered users to buy more storage
4) Allow users to access/upload/delete the files on the cloud
5) Interact with a Distributed file system to store/delete/retrieve the files on the cloud


From the above description of the system, the main components of the system to be built are:
1) SkyDriveController-> Main controller of the system. Allows user interaction with the system
2) DFSController-> Stores the file in the cloud and also allows access/deletion
3)OperationValidator -> performs validations before allowing user interactions with SkyDrive
4)StorageSpaceAllocator -> allocates extra space for users who want to but space

Lets put down the use cases in visual form:








Above use cases describe the user actions and the corresponding system side actions. Now lets move to the Class diagram to see how the different components inter operate:




The class diagram should help you understand the basic components of a cloud based storage system and should give you enough material to speak up in an interview.  In an interview scenario you can earn some brownie points if you can talk about the Distributed file system implementation. Checkout http://en.wikipedia.org/wiki/Google_File_System#Design to know about how files might be stored on the cloud.

-(
   )antosh







3 comments:

  1. do you think they are asking for complete design diagram or they really wan the architecture diagram of the distributed file system

    ReplyDelete
  2. We might need some more details to make this better. For example
    a. How does each system interact with each other?
    b. When a file is changed (not deleted), how do you manage it?
    c. How do you manage storage limitations on each update?
    etc

    ReplyDelete
  3. Are the class diagrams following the conventions? I see many conventions of UML missing

    ReplyDelete