Replace inotify #29

Open
opened 2026-01-28 02:48:03 +00:00 by scossu · 0 comments
Owner

The inotify interface used in pkar_watch is quite handy but has two main problems: a) it only works with Linux; and b) it doesn't seem to detect files coming from SMB clients.

The latter issue is quite annoying as it prevents Pocket Archive being used over SMB.

Alternatives can be considered:

A poll() interface, such as the one provided by LuaPosix. This is the most minimalistic cross-platform option. Slow and single-threaded, but for the job it has to do, it doesn't matter. It needs some workarounds to be able to detect new files in a given directory (if it can even work).

libev or libuv bindings. These are wrappers around several back ends that cover the full Unix spectrum. The latter is higher-level and has many more features that Pocket Archive doesn't need.

cqueues. This is also a Unix-wide wrapper, and it is very widely used. Probably much larger than necessary.

The inotify interface used in `pkar_watch` is quite handy but has two main problems: a) it only works with Linux; and b) it doesn't seem to detect files coming from SMB clients. The latter issue is quite annoying as it prevents Pocket Archive being used over SMB. Alternatives can be considered: A `poll()` interface, such as the one provided by LuaPosix. This is the most minimalistic cross-platform option. Slow and single-threaded, but for the job it has to do, it doesn't matter. It needs some workarounds to be able to detect new files in a given directory (if it can even work). libev or libuv bindings. These are wrappers around several back ends that cover the full Unix spectrum. The latter is higher-level and has many more features that Pocket Archive doesn't need. cqueues. This is also a Unix-wide wrapper, and it is very widely used. Probably much larger than necessary.
scossu added this to the v1.1.0 milestone 2026-01-28 02:48:03 +00:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
scossu/pocket_archive#29
No description provided.