DLD Changes

Miika Turkia miika.turkia at gmail.com
Fri Apr 15 07:18:53 PDT 2016


Hello Rainer,

On Sun, Oct 12, 2014 at 11:07 PM, Rainer Mohr <mail at divelogs.de> wrote:
> 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....

we just got a query about picture syncing with divelogs.de. This
reminded me that we have discussed the topic and I had to dig into my
mail archives. Anyway, has there been any changes/progress since our
last chat? Or what are your thoughts regarding picture sync in
general? E.g. is it worth the effort to implement and bandwidth "we"
are going to hog from you? I am just wondering if I should look into
implementing some support for this. (Not that I would have a clear
picture on what Robert has done on Subsurface end regarding picture
management in-between :D)

> 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...

I should probably take a look into this aspect as well, but that would
mean learning some C++ along the way :( But definitely wold be better
than transferring always the full junk...

miika


More information about the subsurface mailing list