Persistent data » History » Revision 17
« Previous |
Revision 17/18
(diff)
| Next »
Greg Burri, 03/17/2011 12:16 AM
Persistent data¶
Files cache¶
This file contains all the shared files and theirs SHA-1 hashes. This file is saved in user space after an update of the file list, it is completely loaded at the start of D-LAN. If some paths of some files doesn't match the shared directory they are discarded.
This file is saved as a binary file serialized by protocol buffer.
You can see the proto file here : source:/application/Protos/files_cache.proto
Size¶
Here is a size approximation for 50'000 files stored in 1 TB. The overhead of the file format is not taken in account.
Nb of files : 50'0000 Total size : 1 TB Chunk Size : 32 MB Average file per directory : 50 Average filename and dirname length : 50 char Size of a hash : 20B
AverageFileSize = 1*1024^4 / 50'000 = 21MB Sha1Size = floor(AverageFileSize / 32MB) * 20 * 50'000 = 1 * 20 * 50'000 = 977kB FilenameSize = 50'000 * 50 * 2 = 4.8MB (2 bytes per char) DirnameSize = (50'000 / 50) * 50 * 2 = 97kB TotalSize = 977kB + 4.8MB + 97kB = 5.9MB
Queued files and directories¶
A file containing the queued files and directories is saved in user space. An item from the list may contains a remote peer id and/or the hashes which identify a file.
As the file cache file (see above), this file is saved as a binary file serialized by protocol buffer.
For more details see the file : source:/application/Protos/queue.proto
Configuration file¶
Core side¶
here are the persisted data :
- The nick
- The peer ID
As the other data described above these data are saved as a file serialized by Protocol Buffer but in a human readable form.
For more details see the message Settings in file : source:/application/Protos/common.proto
Client Side¶
here are the persisted data :
- Core address
- Password for remote core
Updated by Greg Burri over 13 years ago · 17 revisions