7 The use of a persistent daemon works around slow startup time of
8 Perl. This is especially important for built-in support for
9 shell completion. It will eventually support inotify and EVFILT_VNODE
10 background monitoring of Maildir keyword changes.
12 If lei were reimplemented in a language with faster startup
13 time, the daemon architecture would likely remain since it also
14 lets us easily decouple the local storage from slow IMAP/NNTP
15 backends and allow us to serialize writes to git-fast-import,
16 SQLite, and Xapian across multiple processes.
18 The coupling of IMAP and NNTP network latency to local storage
19 is a current weakness of public-inbox-watch. Therefore, -watch
20 will likely adopt the daemon architecture of lei in the future.
22 Read/write vs read-only storage
23 -------------------------------
25 public-inboxes are intended to be written and read by different
26 Unix users. Commonly, a single Unix user or group will write to
27 a public-inbox, but the inbox will be served by a user with
28 read-only permissions (e.g. "www-data" or "nobody").
30 lei/store is intended to be read and written by a single user,
31 thus we can rely on the Write-Ahead-Log journal of SQLite to
32 improve performance: <https://sqlite.org/wal.html>