Skip to content
This repository has been archived by the owner on Mar 17, 2022. It is now read-only.

Distributed ACE Notes

John Davison edited this page Jan 22, 2020 · 1 revision

analysis.is_modified is going to matter more now
we don’t want excessive updates to external storage
time to implement that properly

flow:
Analysis.save()
stuff is saved to local storage per normal
at the end, all StorageContainers are invoked

for container in self.storage_containers:
container.upload(self) <— self is a StorageObject

when I uploaded version 1 of this object, the next time I need to work with this object
I first check the version of the object in the external storage
if something changed it, then I use the new version and discard the current version

updates to versions must be atomic
a new version is uploaded LOCKED
once the upload is complete, the new version is UNLOCKED
once the new version is UNLOCKED, the old version is scheduled for DELETION (at some point)

requests for data return the most recent unlocked version, or None if all are locked
a data is only locked if the version is being updated

upload:
create_new_locked_data(data_identifier) —> returns current_version and new_version
unlock_data(data_identifier, new_version)
schedule_delete(data_identifier, current_version)

download:
get_current_version(data_identifier) —> return remote_version
if local_version != remote_version:
download(remote_version)

Clone this wiki locally