‹ back home

Status update 2025-01

2025-01-22 #pimsync #status-update

I’ve recently tagged v0.2.0 of pimsync. With pimsync being in a rather stable state, I’m aspiring to make more frequent releases with small sets of changes. I’ll be publishing release notes in the pimutils.org blog, so packagers have a lower-volume RSS feed to track releases.

Optimised discovery process

When libdav performs DNS-based service discovery for a given base_url it now first checks whether the input base_url is a valid CalDAV/CardDav context. If it is, then discovery can be skipped entirely and that input URL is used instead. This skips unnecessary work, and allows using libdav in situations where discovery is misconfigured on a server.

Pimsync uses libdav for discovery, so this improvement affects pimsync as well.

pimsync storage monitoring

I’ve finalised a design for storage monitoring in pimsync. It can now monitor a storage for changes, and react immediately when they happen. This allows synchronising changes immediately, rather than on an interval every N minutes. Currently, monitoring in only implemented for the filesystem storage on Linux (using inotify). An implementation for BSD using kqueue is pending. CalDAV and CardDAV have no mechanism to monitor for events, although there is discussion ongoing to integrate with Web Push. Once this new protocol feature is stabilised, I’ll dive into implementing it for pimsync.

A caveat of how monitoring is integrated is that a full synchronisation is executed. I.e.: when a single item changes, pimsync still checks all items to see if they have changes. This adds a bit of extra work (although it’s still minimal CPU use). I intend to iterate upon this further in future, executing a partial synchronisation (which only sync the item that has changes and doesn’t read or write anything else), but I have other priorities in the immediate future.

pimsync faster start-up

pimsync now resolves parameters specified via a cmd early during start-up. This ensures that all prompts for credentials happen quickly, and network IO happens after these prompts, so you don’t have to wait around a second or two while pimsync starts. I’ve also tweaked how locking happens internally: previously pimsync lock storages so that only one operation happened on each storage at a time. Now, pimsync only lock individual files, so that we only avoid concurrent writes to a same file, but multiple operations can run concurrently on each storage.

Various libdav improvements

I’ve made substantial changes to handling of escaped characters and reserved characters in paths to DAV resources. Mishandling of escape sequences is a common issue for many corner cases in vdirsyncer. I am confident that this set of changes properly handles all scenarios for libdav and pimsync.

I’ve backfilled the changelog with changes in recent versions of libdav as well, so that consumers can properly track what’s changed and how to upgrade. I’ve also made sure that all public interfaces are documented. If anything is still unclear, please reach out.

Have comments or want to discuss this topic?
Send an email to my public inbox: ~whynothugo/public-inbox@lists.sr.ht.
Or feel free to reply privately by email: hugo@whynothugo.nl.

— § —