An open-source scalable personal cloud

Internal database

The client has to maintain internal database to keep track of the files and versions it has in the local repository. In the following image we can observe the database model used in the desktop client.

Internal database
 To achieve the data persistence we use JPA (Java Persistence API), so that classes are directly mapped into the database.

  • CloneChunk: It keeps track of the chunks created by the client. The path indicates the location in the file system and the checksum is calculated over the chunk data.
  • CloneFile: This table contains information about files located in the synchronization folder, including the path, checksum of the file, internal identifier, size, an flag to indicate if it’s a file or a folder, the synchronization status, etc.
  • CloneFile_CloneChunk: This table contains the relation between files and chunks. We need to know what chunks form each file and their order to be able to recover the file later.
  • Workspace: It contains information about the workspaces to which the user is allowed to access.