|
32 | 32 | graceful caller shutdown, committed state snapshots, and an opt-in Minitest |
33 | 33 | helper |
34 | 34 | - 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 |
35 | 37 | - Inline RBS generation/validation, Steep, Standard Ruby, Solid Queue's exact |
36 | 38 | RuboCop policy, and a warning-free Brakeman scan |
37 | 39 | - A JavaScript suite covering the state payload and batched refresh browser |
|
42 | 44 |
|
43 | 45 | - Supervisor: starts and drains thread roles, but does not replace a crashed |
44 | 46 | 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. |
51 | 57 | - Realtime: scalar and dependency-driven keyed ERB component replacement or |
52 | 58 | morphing, personalized refresh authorization, revision fencing, coalescing, |
53 | 59 | reconnect convergence, batched refreshes, and personalized state payloads are |
|
68 | 74 | ## Next milestones |
69 | 75 |
|
70 | 76 | 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. |
74 | 80 | 3. Add result lookup by request ID and broader deadlock retry classification. |
75 | 81 | 4. Add scheduled retention and stale-process maintenance. |
76 | 82 | 5. Add database/server-version checks and MySQL InnoDB verification at boot. |
|
0 commit comments