Apparent differences between WebDAV on NAS vs. Bonjour on macOS - WebDAV ports - WebDAV URL

I’ve made changes to my setup, where I now sync multiple devices with DTTG and DT3 over one central sync store on a NAS using WebDAV. Before I used Bonjour sync, where macOS functioned as a central server.

I noticed quite soon that syncing with the sync store allowed much more frequent DTTG background sync on iOS. I.e. with Bonjour I had to manually activate DTTG sync more or less each time, although it sometimes was performed automatically. The recent sync time now corresponds with the time of me opening the DTTG app. Both macOS and the NAS are active (not sleeping or suspended) while observing this behavior. I haven’t changed the DTTG usage, but have reset the device to factory default recently.

  1. Is there a fundamental difference in the push/pull mechanism between macOS DT3 and DTTG over Bonjour vs. using a central WebDAV server with a sync store?

  2. I know DT doesn’t actively support WebDAV versions and methods, but might I suggest making a small addition to the manual? It took me considerable time to find out I needed to specify the WebDAV port used in the URL. This doesn’t seem to be mentioned in the manual (sorry to ask might I have read over it). Specifying the port could be NAS specific I presume.

  3. When using folders with spaces on a NAS (I shouldn’t have in retrospect), the space in the URL gets replaced with %20 in DT3, but DTTG only reports an incorrect URL without further explanation. I would suggest DTTG also assumes %20 where spaces are used.

Syntax of URL to WebDAV using HTTPS:
https://server-address:port/path/to/folder%20with%20spaces

I’m a fanboy of WebDAV access for Sync Database, but my URI does not have spaces. At least in Windows, if you quote mark the URI, it is accepted with spaces. Somewhat like this:

https://server-address:port/path/to/folder%20with%20spaces”

I haven’t tested this but should work…

Sorry for any confusion, but I was referring to DTTG. I just tested your quote suggestion, but that doesn’t work.

To be honest, I usually don’t use spaces to avoid such situations. But now that I have, I thought it would be nice to post it here, might someone using DTTG is getting stuck with the address not valid comment (where DT3 replaces spaces automatically using %20)

Thanks!
I have filed an issue on the spaces in a WebDAV location’s name (though yes, we do suggest people avoid using spaces in the names. CamelCase or underscores are useful delimiters, though the name is case-sensitive).

And yes, ports are dependent on the implementation. WebDAV typically runs on standard HTTP ports, 80 and 443. But for something like a Synology NAS, it’s typically ports 5005 and 5006. In that case, yes you’d need to specify a non-standard port in the URL.

Any thoughts as to why Bonjour background sync seems to be less “smooth” (for lack of a better word) than WebDAV?

I know background activity is handled by iOS, so resetting the devices might explain it. Then again, DTTG was one of the most active apps on those devices. The macOS firewall was running, but allowed DT3 Bonjour traffic. Bonjour sync was/is possible and sometimes performed in the background.

@cgrunenberg would have to comment on the possible technical aspects.

From DEVONthink To Go’s side, Bonjour and sync-store-backed syncs are treated identical. When you wake up the app it starts synchronizing, and when you set it to sync automatically a background sync is triggered every time you sync from, e.g., the Mac to the WebDAV server.

Maybe that is the difference: A Bonjour sync happens only when you open the app, a WebDAV sync also happens the background when the upload of new data to the sync store triggers an invisible notification that wakes up DEVONthink To Go and causes it to sync. That’s how the “background refresh” on iOS works.

So you mean when you enter a URL it should be URL-encoded before saving? We assumed that URLs would be entered in their correct form, with %20 for spaces. But it’s doable, of course, to encode the URL, just in case.

That would certainly explain it. Perhaps Bonjour could also trigger that notification somehow? For me it more or less wasn’t syncing in way that was usable as “background” sync. It wasn’t a major discomfort either of course, more of a nuisance.

Might I suggest you test this for a while and observe the difference yourself? It’s dependent on iOS as it needs to prioritize DTTG as a background process first.

So you mean when you enter a URL it should be URL-encoded before saving?

That seems to be the behavior of DT3 as I didn’t code the %20 there either, but noticed DT3 replaced the space for me. DTTG only seems to remark that the URL is incorrect.

Of course there are many more incorrect ways to code a URL, but most NAS systems only allow for spaces in shared folders I presume.

I changed the network folder BTW, as I wouldn’t be surprised if I would run into other issues (not DT related) in the future.

While for sync stores the application holding the new data its actively pushing the data to the sync store if can trigger the notification. For Bonjour syncs this is exactly the other way round: the client starts the sync. So in this case we’d need to trigger the notification already whenever there are any changes in the source database.

Noted as a feature request.