-
Notifications
You must be signed in to change notification settings - Fork 9
Distributed ACE Notes
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)