Difference between revisions of "Cloud Storage Support"

Jump to navigation Jump to search
adding info about the 2016 GSoC work
m (Added link to the Cloud Storage Scopes List page)
(adding info about the 2016 GSoC work)
 
(2 intermediate revisions by 2 users not shown)
Line 1: Line 1:
Work was done by the GSoC student [[User:Tkachov|Tkachov]] during the [[Summer of Code/GSoC2016|GSoC 2016]] to implement cloud storage support in ScummVM.
== Overview ==
== Overview ==


Line 81: Line 83:
== Syncing saves ==
== Syncing saves ==


If Storage is connected, saves sync would be started on ScummVM launch, on each manual and autosave and when Save/Load Dialog is opened. If one saves sync is already running, the other would be scheduled after the first one is finished to check whether there are new files to sync.
If Storage is connected, saves sync would be started on ScummVM launch, on each manual and autosave, when a storage is connected and when Save/Load Dialog is opened. If one saves sync is already running, the other would be scheduled after the first one is finished to check whether there are new files to sync.


Loading from files which are being synced is not available. A popup with progress bar is shown in the Save/Load Dialog while ScummVM downloads files from the remote storage. In games with "complex" saves names loading is completely unavailable while files are being downloaded. While ScummVM uploads files, it's safe to use these files already.
Loading from files which are being synced is not available. A popup with progress bar is shown in the Save/Load Dialog while ScummVM downloads files from the remote storage. In games with "complex" saves names loading is completely unavailable while files are being downloaded. While ScummVM uploads files, it's safe to use these files already.
Line 88: Line 90:


Saves sync actually syncs all the files within the "ScummVM/Saves" remote directory and "Saved games" local directory (the savespath, that is). Directories are considered flat, so subdirectories are not synced (if there are any). A special "timestamps" local file is used to determine which files should be synced. It contains the remote "modified at" timestamps for each file. If remote file has a newer timestamp or is not listed, it's being downloaded. If local file has a newer timestamp or is not listed (but exists), it's being uploaded. We download files first, upload second. Timestamps are updated after each downloaded and uploaded file, so if sync is interrupted, next sync will continue from the right state.
Saves sync actually syncs all the files within the "ScummVM/Saves" remote directory and "Saved games" local directory (the savespath, that is). Directories are considered flat, so subdirectories are not synced (if there are any). A special "timestamps" local file is used to determine which files should be synced. It contains the remote "modified at" timestamps for each file. If remote file has a newer timestamp or is not listed, it's being downloaded. If local file has a newer timestamp or is not listed (but exists), it's being uploaded. We download files first, upload second. Timestamps are updated after each downloaded and uploaded file, so if sync is interrupted, next sync will continue from the right state.
When file fails to upload, storage providers ignore that there was some uploading session and file is not created or modified. ScummVM stops the sync, and tries to upload that file again on next sync.
When file fails to download, ScummVM deletes the invalid file and stops the sync. As its timestamp is not updated, ScummVM would try to download the file again on next sync.
8,012

edits

Navigation menu