Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

When synGet() is called, the client first retrieves the file handle ID and MD-5 from the entity, then checks whether the file already exists.  If the download destination is an external cache location, the client computes its MD-5 to determine whether it differs from the version in Synapse.  If so, the client must either throw an exception or prompt the user to either (1) confirm overwrite or (2) keep the original file.  (If the latter, a subsequent synStore() would overwrite the Synapse version with the local copy.)

Note:  There are multiple ways to implement the external cache map.  One approach is to maintain the map in memory, serialize and store in a file at the end of a session, read back into memory when starting the next session.    Such a file could be shared between clients, though concurrent access by multiple clients on a machine is a more complex issue.

Note:  This architecture supports a recursive synGet() function in which a Folder and all its children are retrieved.  The top level folder would be specified as an external cache location, and the children would be placed in folders/files following the Synapse hierarchy.  The user would not be permitted to modify the folder hierarchy, but files could be edited and then the tree persisted with a recursive synSet().

...