better storage for dive log and pictures
Dirk Hohndel
dirk at hohndel.org
Thu Aug 21 14:10:34 PDT 2014
We have a few problems in this area and while they aren't strictly related
I think it would be wise to address them together.
a) XML file storage is reasonably well understood. We have a default
directory on each platform and a scheme to create a default name.
We can set the default filename in the UI. One thing missing might be a
button that says "make current data file the default data file".
b) git file storage has many issues:
b1) we can't even enter the magic filename pattern on MacOS (the
'[branch]' syntax is not something you can do with the file
select dialog
b2) having an empty directory where people store their data will be very
confusing to the non-hacker. I understand why this is what we have
but I think we simply HAVE to check out the data by default and check
if the user changed the checked out data. With a UI that asks the user
to check the changes into the repository
b3) we need a Subsurface internal UI that allows the user to connect the
local repository to a remote repository
b3.1) have the user point Subsurface to a custom remote repository on a
server they control
b3.2) have Subsurface create a repository transparently for the user - I
was thinking of using gists on github for that, but we still need to
figure out the account creation and authentication / authorization
questions that this raises. Alternatively / additionally we could
have a git service on subsurface.hohndel.org
b4) we should support at least very simple cases of merging remote and
local repository. User has multiple computer. Takes one on the dive
trip, updates dive log from there. Is then able to sync the divelog on
the "home" computer and simply have the dives recorded on the laptop
(and soon maybe tablet) show up on the other linked computers
c) picture storage. today we store absolute filenames. That's trivial to
do but has all kinds of issues. What happens if you switch to a
different computer? What in the git scenario above with multiple
computers? What about people using dropbox to keep their divelog in
sync between multiple computers
c1) one solution would be a base directory approach. We have a setting in
Subsurface that says all pictures paths are relative to that base
directory - so if you move things to a different computer, move the
pictures as well and enter the newbase directory
c2) relative paths: both XML and git have the concept of a base path where
the repository is located on the local machine (even if the git syntax
may needs to be changed, see b1 above). Make the picture be relative
to that. But then what happens if you move your dive file. Or if you
export dives to a different file / location. Do we rewrite all those
relative paths?
c3) with git we could of course check in the pictures... but that could be
HUGE for people with many full size pictures... I don't think this is
reasonable.
Please consider this brain storming. Maybe there are other, better
solutions? Post your ideas here. There was some discussion on trac
(http://trac.hohndel.org/ticket/669) including references to RFC1630 - I
don't think that's the complexity that we want (ignoring that this
standard is 20 years old). Instead I am looking for something pragmatic
and extensible that works both with XML and git storage, across all three
OSs (forget symlinks) and addresses common usecases.
/D
More information about the subsurface
mailing list