DLD Changes

Rainer Mohr mail at divelogs.de
Sun Oct 12 13:07:54 PDT 2014


Hi Robert,

Am 12.10.14 21:47, schrieb Robert Helling:
> the image data design of subsurface is by far not final and indeed we 
> currently access images by their local filename. The problems with 
> that are obvious and as soon as you want to take your log to a 
> different computer you are in trouble. OTOH you don’t want to download 
> some hundreds of pictures from a web server every time you scroll 
> through you dive log, so at least some cache has to be local. We still 
> have to figure out how to do this right.

Totally agree on that, it needs to be local, so you can view it on the 
liveaboard, when you need it.

>
> But for the time being, why do you include the actual image in your 
> download api and not just a URL? You are running a web service that 
> actually hosts those pictures. So downloading would be much faster and 
> if some downloader would really want the image file it could still GET 
> them from the URL without any hassle. What do you think?

Well, the idea behind the way it's implemented now is: You want to 
transfer your log with all data from one machine to another and have it 
available offline. That includes the pictures and you get them with one 
request (and a big file) in one go. The alternative is off course to 
just provide URLs to the pictures and keep the DLD file small, but that 
would result in another 2090 HTTP Requests just to get all the pictures 
in my case....

The API does offer a bit more than subsurface uses at the moment though, 
which would abolish the need to download all this data every time: There 
is a call to /xml_available_dives.php , that gives you a list of all 
dives with ID, date and time as well as the last-change-timestamp of the 
dive. Based on that list, you COULD compare which dives are already 
there based on date and time (which should be unique for each dive as 
most people can't do two dives at the same moment) and just request the 
IDs you don't have yet (or wish to update based on the last change 
timestamp). the IDs are an optional parameter to the retrieval call for 
the DLD and will then limit the export to only those.

Using that, each dive would only be downloaded once, including the 
pictures...

But I'm open to discussions about this.

Rainer
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.subsurface-divelog.org/pipermail/subsurface/attachments/20141012/7e986344/attachment.html>


More information about the subsurface mailing list