<html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class="">Hi Jason,<div class=""><br class=""></div><div class="">Thanks for the feedback. Yes, the new DNS records now have much longer TTL and are therefore more likely to be cached.</div><div class="">I also made some subtle changes to the logic when we first attempt to connect and actually try to start writing to the cloud that might make a difference there.</div><div class=""><br class=""></div><div class="">/D<br class=""><div><br class=""><blockquote type="cite" class=""><div class="">On Apr 19, 2021, at 1:50 PM, Jason Bramwell  wrote:</div><br class="Apple-interchange-newline"><div class=""><div class="WordSection1" style="page: WordSection1; caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none;"><div style="margin: 0cm; font-size: 11pt; font-family: Calibri, sans-serif;" class="">Many thanks as always.</div><div style="margin: 0cm; font-size: 11pt; font-family: Calibri, sans-serif;" class=""><o:p class=""> </o:p></div><div style="margin: 0cm; font-size: 11pt; font-family: Calibri, sans-serif;" class="">I used to see a ‘feature’ where the first attempt to load Subsurface would fall back to using the local cache and i’d have to close/reopen Subsurface to get it to connect to the cloud storage, Linux diagnosed this as likely slow DNS lookup, very brief testing (I do mean very brief) seems to indicate that this is no longer the save now and it ‘just works’.</div><div style="margin: 0cm; font-size: 11pt; font-family: Calibri, sans-serif;" class=""><o:p class=""> </o:p></div><div style="margin: 0cm; font-size: 11pt; font-family: Calibri, sans-serif;" class="">Jason</div><div style="margin: 0cm; font-size: 11pt; font-family: Calibri, sans-serif;" class=""><o:p class=""> </o:p></div><div style="margin: 0cm; font-size: 11pt; font-family: Calibri, sans-serif;" class="">Sent from<span class="Apple-converted-space"> </span><a href="https://go.microsoft.com/fwlink/?LinkId=550986" style="color: blue; text-decoration: underline;" class="">Mail</a><span class="Apple-converted-space"> </span>for Windows 10</div><div style="margin: 0cm; font-size: 11pt; font-family: Calibri, sans-serif;" class=""><o:p class=""> </o:p></div><div style="border-style: solid none none; border-top-width: 1pt; border-top-color: rgb(225, 225, 225); padding: 3pt 0cm 0cm;" class=""><div style="margin: 0cm; font-size: 11pt; font-family: Calibri, sans-serif; border: none; padding: 0cm;" class=""><b class="">From:<span class="Apple-converted-space"> </span></b><a href="mailto:subsurface@subsurface-divelog.org" style="color: blue; text-decoration: underline;" class="">Dirk Hohndel via subsurface</a><br class=""><b class="">Sent:<span class="Apple-converted-space"> </span></b>19 April 2021 21:00<br class=""><b class="">To:<span class="Apple-converted-space"> </span></b><a href="mailto:subsurface@subsurface-divelog.org" style="color: blue; text-decoration: underline;" class="">Subsurface Mailing List</a><br class=""><b class="">Subject:<span class="Apple-converted-space"> </span></b>redundant cloud servers</div></div><div style="margin: 0cm; font-size: 11pt; font-family: Calibri, sans-serif;" class=""><o:p class=""> </o:p></div><div style="margin: 0cm; font-size: 11pt; font-family: Calibri, sans-serif;" class=""><o:p class=""> </o:p></div><div style="margin: 0cm; font-size: 11pt; font-family: Calibri, sans-serif;" class="">Over the past couple of weeks I quietly moved the cloud server backend and the authentication database out of my home network and back into the public cloud.</div><div style="margin: 0cm; font-size: 11pt; font-family: Calibri, sans-serif;" class="">The fact that apparently no one noticed and nothing broke was rather encouraging :-)</div><div style="margin: 0cm; font-size: 11pt; font-family: Calibri, sans-serif;" class=""><o:p class=""> </o:p></div><div style="margin: 0cm; font-size: 11pt; font-family: Calibri, sans-serif;" class="">I then setup a second cloud server in the public cloud, this one in Europe (actually, Frankfurt, Germany).</div><div style="margin: 0cm; font-size: 11pt; font-family: Calibri, sans-serif;" class=""><o:p class=""> </o:p></div><div style="margin: 0cm; font-size: 11pt; font-family: Calibri, sans-serif;" class="">A few minutes ago I merged a pull request that adds a couple of interesting new features to both Subsurface and Subsurface-mobile:</div><div style="margin: 0cm; font-size: 11pt; font-family: Calibri, sans-serif;" class=""><o:p class=""> </o:p></div><div style="margin: 0cm; font-size: 11pt; font-family: Calibri, sans-serif;" class="">- geo based choice of cloud server (those in the Americas should end up using the US server, everyone else should get directed to the European server), which is intended to be completely transparent to the user.</div><div style="margin: 0cm; font-size: 11pt; font-family: Calibri, sans-serif;" class="">I.e., unless you explicitly look for it, you shouldn't notice (or care) which server you are using</div><div style="margin: 0cm; font-size: 11pt; font-family: Calibri, sans-serif;" class="">- hot failover between the two servers (so if the server that you have used before is unavailable, Subsurface and Subsurface-mobile should try the other one - and the implementation makes it easy to add more servers if that appears useful)</div><div style="margin: 0cm; font-size: 11pt; font-family: Calibri, sans-serif;" class=""><o:p class=""> </o:p></div><div style="margin: 0cm; font-size: 11pt; font-family: Calibri, sans-serif;" class="">The two servers are automatically kept in sync in the background. I can create one extremely artificial case where there is a fairly short (generally sub one second in my tests) window for a race condition. A user would have to have two different devices that are synced to different servers (for example because they took their phone with them on an overseas dive trip), that have made conflicting changes to the dive log, and the user would then have to cause a save to the cloud on both devices within the roughly one second window. Forcing that race turned out to be fairly hard because the mobile app does a few other things before storing the data to the cloud - so for testing I ended up using two instances of Subsurface and synchronized clicks... really -- not a realistic scenario.</div><div style="margin: 0cm; font-size: 11pt; font-family: Calibri, sans-serif;" class=""><o:p class=""> </o:p></div><div style="margin: 0cm; font-size: 11pt; font-family: Calibri, sans-serif;" class="">If this were to happen, I will get an automated email alert and fixing the problem isn't really hard - but I wanted to give a full disclosure of the issues that I am aware of.</div><div style="margin: 0cm; font-size: 11pt; font-family: Calibri, sans-serif;" class=""><o:p class=""> </o:p></div><div style="margin: 0cm; font-size: 11pt; font-family: Calibri, sans-serif;" class="">What would help right now if people tested all this.</div><div style="margin: 0cm; font-size: 11pt; font-family: Calibri, sans-serif;" class="">So far I have not had the time to make new beta versions of Subsurface-mobile, but as I said, it's actually easier to test on the desktop.</div><div style="margin: 0cm; font-size: 11pt; font-family: Calibri, sans-serif;" class=""><o:p class=""> </o:p></div><div style="margin: 0cm; font-size: 11pt; font-family: Calibri, sans-serif;" class="">/D</div><div style="margin: 0cm; font-size: 11pt; font-family: Calibri, sans-serif;" class="">_______________________________________________</div><div style="margin: 0cm; font-size: 11pt; font-family: Calibri, sans-serif;" class="">subsurface mailing list</div><div style="margin: 0cm; font-size: 11pt; font-family: Calibri, sans-serif;" class=""><a href="mailto:subsurface@subsurface-divelog.org" class="">subsurface@subsurface-divelog.org</a></div><div style="margin: 0cm; font-size: 11pt; font-family: Calibri, sans-serif;" class=""><a href="http://lists.subsurface-divelog.org/cgi-bin/mailman/listinfo/subsurface" class="">http://lists.subsurface-divelog.org/cgi-bin/mailman/listinfo/subsurface</a></div></div></div></blockquote></div><br class=""></div></body></html>