13 releases (breaking)
0.35.1 | Aug 31, 2024 |
---|---|
0.35.0 | May 17, 2024 |
0.34.1 | Mar 9, 2024 |
0.31.0 | Oct 27, 2023 |
0.25.0 | Apr 1, 2021 |
#962 in Parser implementations
3,139 downloads per month
Used in 15 crates
(11 directly)
9.5MB
72K
SLoC
This crate implements IPC mechanisms to communicate with Sequoia background services.
lib.rs
:
IPC mechanisms for Sequoia.
This crate implements IPC mechanisms to communicate with Sequoia services.
Rationale
Sequoia makes use of background services e.g. for managing and updating public keys.
Design
We use the filesystem as namespace to discover services. Every service has a file called rendezvous point. Access to this file is serialized using file locking. This file contains a socket address and a cookie that we use to connect to the server and authenticate us. If the file does not exist, is malformed, or does not point to a usable server, we start a new one on demand.
This design mimics Unix sockets, but works on Windows too.
External vs internal servers
These servers can be either in external processes, or co-located within the current process. We will first start an external process, and fall back to starting a thread instead.
Using an external process is the preferred option. It allows us to continuously update the keys in the keystore, for example. It also means that we do not spawn a thread in your process, which is frowned upon for various reasons.
Please see IPCPolicy
for more information.
Dependencies
~13–30MB
~405K SLoC