Advertisement
Guest User

Untitled

a guest
Aug 9th, 2014
272
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.41 KB | None | 0 0
  1.  
  2. ## Switch storage format
  3. Switch the storage format to something that can make use of the FTP `APPE` command.
  4.  
  5. Pros:
  6.  
  7. * Only upload what you need (almost zero overhead)
  8. * Combinable with #1
  9.  
  10. Cons:
  11.  
  12. * Most code will have to rewritten
  13. * You can only log changes to the end of a file (leaving the original data intact)
  14. * If you have many changes the file will blow up tremendously and will require frequent trimming of unused data
  15. * Other clients will have to download the entire thing every time something changes<br />(no change from current situation)
  16.  
  17. ## Switch storage format (with extra index file)
  18. Switch the storage format to something that can make use of the FTP `APPE` command. Additionally write an index file that contains the binary offset and length of each data block. Clients can then download only the parts they need using `REST` and `RETR` commands.
  19.  
  20. Pros:
  21.  
  22. * Only upload what you need plus the index file
  23. * Combinable with #1
  24. * Other clients only have to download what they need
  25.  
  26. Cons:
  27.  
  28. * Most code will have to rewritten
  29. * Index file has the updated every time
  30. * Might not be possible in your case<br />(if there is no way to identify the files content by name)
  31. * You can still only log changes at the end of the main file (leaving the original data intact)
  32. * If you have many changes the main file will still blow up tremendously and will require frequent trimming of unused data
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement