Skip to content

Commit 3d68535

Browse files
committed
docs: record the PostgreSQL wake-up adapter
Milestone 2 shipped without the roadmap being updated, so it still described PostgreSQL notifications as unimplemented and the cross-process polling delay as unaddressed. Record the adapter, its measured latency, why it is opt-in rather than automatic, and that MySQL has no notification primitive. Milestone 2 now covers only the remaining Redis adapter.
1 parent 03f6034 commit 3d68535

1 file changed

Lines changed: 15 additions & 9 deletions

File tree

docs/roadmap.md

Lines changed: 15 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,8 @@
3232
graceful caller shutdown, committed state snapshots, and an opt-in Minitest
3333
helper
3434
- SQLite, PostgreSQL, and MySQL integration suites
35+
- Opt-in cross-process wake-up on PostgreSQL through `WakeUpAdapters.for`, with
36+
a listening connection per waiting thread and release on supervisor shutdown
3537
- Inline RBS generation/validation, Steep, Standard Ruby, Solid Queue's exact
3638
RuboCop policy, and a warning-free Brakeman scan
3739
- A JavaScript suite covering the state payload and batched refresh browser
@@ -42,12 +44,16 @@
4244

4345
- Supervisor: starts and drains thread roles, but does not replace a crashed
4446
role or run periodic maintenance automatically.
45-
- Wake-up strategy: in-process signaling plus durable polling and injection are
46-
implemented; PostgreSQL `LISTEN/NOTIFY` and optional Redis adapters are not.
47-
Signaling cannot cross process boundaries, so a commit in a web process does
48-
not wake a broadcast executor in a worker process; that delivery waits up to
49-
`polling_interval`, 100 ms by default. This is the largest remaining term in
50-
reactive update latency, and neither batching nor state payloads reduce it.
47+
- Wake-up strategy: in-process signaling, durable polling, injection, and an
48+
opt-in PostgreSQL notification adapter are implemented; a Redis adapter is
49+
not. In-process signaling cannot cross process boundaries, so without the
50+
adapter a commit in a web process does not wake a broadcast executor in a
51+
worker process and that delivery waits up to `polling_interval`, 100 ms by
52+
default. `WakeUpAdapters.for` removes that delay on PostgreSQL, measured at
53+
103.7 ms to 2.9 ms at p50. It is opt-in rather than automatic: it opens a
54+
connection per waiting thread outside the pool, and `LISTEN` does not survive
55+
a transaction-pooling proxy such as PgBouncer. MySQL has no notification
56+
primitive, so MySQL applications keep polling.
5157
- Realtime: scalar and dependency-driven keyed ERB component replacement or
5258
morphing, personalized refresh authorization, revision fencing, coalescing,
5359
reconnect convergence, batched refreshes, and personalized state payloads are
@@ -68,9 +74,9 @@
6874
## Next milestones
6975

7076
1. Add automatic supervisor role replacement and periodic dead-process cleanup.
71-
2. Add PostgreSQL notification and optional Redis wake-up adapters with latency
72-
benchmarks and polling-race tests, removing the cross-process polling delay
73-
rather than shrinking it with a smaller `polling_interval`.
77+
2. Add an optional Redis wake-up adapter, which is the remaining cross-process
78+
option for MySQL. The PostgreSQL notification adapter, its latency
79+
benchmark, and its concurrency tests are implemented.
7480
3. Add result lookup by request ID and broader deadlock retry classification.
7581
4. Add scheduled retention and stale-process maintenance.
7682
5. Add database/server-version checks and MySQL InnoDB verification at boot.

0 commit comments

Comments
 (0)