@mark1russell7/machines 0.3.13 → 0.3.15

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -43,13 +43,17 @@ The algebra reads these documents. It gives the closed form of each timer, the f
43
43
  | `NODE_POSTGRES` | `node-postgres` | node-postgres 8.23.1 with pg-pool 3.14.0: one client of a `pg.Pool` | driver | 30 implemented, 2 documented, 1 derived |
44
44
  | `POSTGRES_SESSION` | `postgres-session` | One client connection of a PostgreSQL 17.11 backend | server | 41 implemented, 2 documented |
45
45
  | `HIKARICP_PGJDBC` | `hikaricp-pgjdbc` | HikariCP 7.1.0 over pgjdbc 42.7.13: one connection of a pool | driver | 41 implemented, 1 documented, 2 derived |
46
- | `PGBOUNCER_CLIENT` | `pgbouncer-client` | PgBouncer 1.26.1 in transaction pooling: one client connection | proxy | 29 implemented |
47
- | `PGBOUNCER_SERVER` | `pgbouncer-server` | PgBouncer 1.26.1 in transaction pooling: one server connection of a pool | proxy | 26 implemented |
48
- | `PGPOOL_SESSION` | `pgpool-session` | Pgpool-II 4.7.3 with one backend: one session of a client in its child process | proxy | 15 implemented |
49
- | `SUPAVISOR_CLIENT` | `supavisor-client` | Supavisor 2.9.13 in transaction mode: one client connection | proxy | 15 implemented |
46
+ | `PGBOUNCER_CLIENT` | `pgbouncer-client` | PgBouncer 1.26.1 in transaction pooling: one client connection | proxy | 30 implemented |
47
+ | `PGBOUNCER_SERVER` | `pgbouncer-server` | PgBouncer 1.26.1 in transaction pooling: one server connection of a pool | proxy | 27 implemented, 1 observed |
48
+ | `PGPOOL_SESSION` | `pgpool-session` | Pgpool-II 4.7.3 with one backend: one session of a client in its child process | proxy | 16 implemented |
49
+ | `SUPAVISOR_CLIENT` | `supavisor-client` | Supavisor 2.9.13 in transaction mode: one client connection | proxy | 16 implemented, 1 observed |
50
50
  | `SUPAVISOR_SERVER` | `supavisor-server` | Supavisor 2.9.13 in transaction mode: one server connection of the pool of a tenant | proxy | 10 implemented, 1 observed |
51
+ | `AMQPLIB` | `amqplib` | amqplib 2.2.0: one connection to an AMQP 0-9-1 broker, its heartbeat and an RPC of its channel | driver | 18 implemented, 1 documented |
52
+ | `RABBITMQ_CONNECTION` | `rabbitmq-connection` | RabbitMQ 4.3.6: one connection of AMQP 0-9-1 on the broker | server | 14 implemented, 1 documented |
53
+ | `ATEN_DETECTOR` | `aten` | aten 0.6.0: one node that the failure detector of another node of RabbitMQ watches | server | 7 implemented |
54
+ | `RA_MEMBER` | `ra-member` | ra 3.1.10: one member of the Raft cluster of a quorum queue of RabbitMQ 4.3.6 | server | 25 implemented |
51
55
 
52
- Nineteen documents operate on Linux TCP (`over`). Linux TCP, conntrack, the Sentinel and the replication of mongod operate on no other document. The `conditions` of each document give the range where it holds, for example a range of kernels.
56
+ Twenty-one documents operate on Linux TCP (`over`). Linux TCP, conntrack, the Sentinel, the replication of mongod, aten and the member of Ra operate on no other document. The `conditions` of each document give the range where it holds, for example a range of kernels.
53
57
 
54
58
  The package also gives these parts:
55
59
 
@@ -95,6 +99,18 @@ A change to the version of a system changes its sources too. Each fact of the do
95
99
 
96
100
  In this repository, a snapshot of the predictions of the cells (`packages/cells/src/__snapshots__/predictions.json`) shows each prediction that a change to a document moves.
97
101
 
102
+ ### 0.3.15
103
+
104
+ - **The cluster of a quorum queue of RabbitMQ 4.3.6.** Two new documents, each from the source in the release of RabbitMQ:
105
+ - `aten`: the failure detector between the nodes, aten 0.6.0. Each node sends a heartbeat to each other node each 100 ms. The detector polls each 5 s in RabbitMQ (1 s at the defaults of aten). It reports a node down when the time since its last heartbeat is 1.5 times its gaps. Thus a silent node is down 150 ms to approximately 5.2 s after its last heartbeat.
106
+ - `ra-member`: one member of the Raft cluster of a quorum queue, ra 3.1.10. When aten reports the node of the leader down, a follower waits 5 s to 6 s, and then it asks for pre-votes. A majority makes a candidate, and the votes of a majority make the leader. A leader ignores aten, thus it stays the leader in a minority and commits nothing.
107
+
108
+ ### 0.3.14
109
+
110
+ - **amqplib 2.2.0 and RabbitMQ 4.3.6.** Two new documents, each from the source at its tag:
111
+ - `amqplib`: one connection and one channel. At the defaults it takes the heartbeat of the broker, 60 s. It ends the connection 2 to 3 heartbeats after the last bytes of the broker. An idle connection sends a heartbeat frame each 60 s. Nagle is on, and an RPC has no timer.
112
+ - `rabbitmq-connection`: one connection on the broker. It sends a heartbeat frame each 30 s on an idle connection. It ends the connection 2 to 3 heartbeats after the last bytes of the client. Each socket has linger 0, thus each close of the broker is a reset. The listener of ranch 2.3.0 gives each socket a send timeout of 30 s.
113
+
98
114
  ### 0.3.13
99
115
 
100
116
  - **A reload of a pooler.** `pgbouncer-client`, `pgbouncer-server` and `pgpool-session` have the event `local.reload`: SIGHUP, which reads the configuration again. No transition takes it, thus a session keeps its state, its server and each timer.
package/build/index.d.ts CHANGED
@@ -337,6 +337,82 @@ export declare const PROCEDURES_WS_CLIENT: Machine;
337
337
  */
338
338
  export declare const PROCEDURES_WS_SERVER: Machine;
339
339
  //#endregion
340
+ //#region src/rabbit/amqplib.d.ts
341
+ /**
342
+ * This document is amqplib 2.2.0 on Node, for one connection to a broker of AMQP 0-9-1 and one channel
343
+ * on it. It gives the states of the connection, from its connect to its end, and the timers that act on
344
+ * it.
345
+ *
346
+ * At the defaults, amqplib takes the heartbeat that the broker proposes: 60 s for RabbitMQ 4.3. Each 30 s
347
+ * it sends a heartbeat frame when it sent nothing since the check before. Its own heartbeat counts as a
348
+ * send, thus an idle connection sends one each 60 s. Each 60 s it checks that the broker sent
349
+ * something, and after two checks with nothing it ends the connection: 'Heartbeat timeout'. That end
350
+ * comes 2 to 3 heartbeats after the last data.
351
+ *
352
+ * amqplib sets TCP_NODELAY only when the caller asks for it, thus Nagle is on at the defaults. It sets no
353
+ * keepalive and no connect timeout. An RPC of a channel has no timer. The package does not connect again
354
+ * by itself. Its recovery is a wrapper that this document does not hold.
355
+ */
356
+ export declare const AMQPLIB: Machine;
357
+ //#endregion
358
+ //#region src/rabbit/aten.d.ts
359
+ /**
360
+ * This document is aten 0.6.0, the failure detector between the nodes of RabbitMQ 4.3.6. It gives one
361
+ * node that another node watches: up or down, as the detector of the watching node sees it.
362
+ *
363
+ * Each node sends a heartbeat to each connected node each 100 ms. The sink of the watching node keeps
364
+ * the gaps between the heartbeats of each node. Its detector polls each 5000 ms: aten polls each 1000 ms
365
+ * by its own default, and RabbitMQ sets 5000 ms, for fewer false elections.
366
+ *
367
+ * At a poll, the probability of a failure is a share of the gaps. A gap counts when 1.5 times the gap
368
+ * is not longer than the time since the last heartbeat. The node is down when that share reaches 0.99.
369
+ * With gaps of approximately 100 ms, that is approximately 150 ms after the last heartbeat, at the first
370
+ * poll after it. Thus a silent node is down 150 ms to approximately 5.2 s after its last heartbeat,
371
+ * long before the tick of the distribution.
372
+ *
373
+ * A closed connection of the distribution (a stopped node) removes the data of the node from the
374
+ * sink. The next poll then reports the node down.
375
+ */
376
+ export declare const ATEN_DETECTOR: Machine;
377
+ //#endregion
378
+ //#region src/rabbit/ra-member.d.ts
379
+ /**
380
+ * This document is ra 3.1.10, for one member of the Raft cluster of a quorum queue of RabbitMQ 4.3.6.
381
+ * It gives the roles of the member, the election timers, and the change of leader.
382
+ *
383
+ * A follower watches the node of its leader with aten. When aten reports that node down, the follower
384
+ * arms a long election timeout. The timeout is the poll interval of aten, 5 s in RabbitMQ, and a random
385
+ * part up to 1 s. A valid message of the leader cancels it. When the timeout fires, the follower asks for pre-votes in
386
+ * its term.
387
+ *
388
+ * A member grants a pre-vote when the log of the candidate is not behind its own. A member that is
389
+ * still a follower of a live leader grants it too. A majority of pre-votes makes a candidate. The
390
+ * candidate starts a new term and asks for votes, and a majority makes it the leader. The new leader
391
+ * of the queue tells each publisher of the queue. Then the channel of each publisher sends its pending
392
+ * publishes again to the new leader.
393
+ *
394
+ * A leader ignores the events of aten. Thus a leader that loses the majority stays the leader in its
395
+ * minority, and it commits nothing, until it sees a higher term.
396
+ */
397
+ export declare const RA_MEMBER: Machine;
398
+ //#endregion
399
+ //#region src/rabbit/rabbitmq-connection.d.ts
400
+ /**
401
+ * This document is RabbitMQ 4.3.6, for one connection of AMQP 0-9-1 on the broker. It gives the reader of
402
+ * the connection, from the accept to the close, and the timers that act on it.
403
+ *
404
+ * At the defaults the broker proposes a heartbeat of 60 s, and it uses the value of the tune-ok of the
405
+ * client. Each 30 s it sends a heartbeat frame when it sent nothing: its own heartbeat does not count,
406
+ * thus an idle connection gets one each 30 s. Each 60 s it checks that the client sent something. After
407
+ * two checks with nothing, it ends the connection, 2 to 3 heartbeats after the last data.
408
+ *
409
+ * Each socket of a listener has linger 0, thus each close of the broker is a reset, not a FIN. The
410
+ * listener of ranch gives each socket a send timeout of 30 s. After it, the BEAM closes the socket, with
411
+ * a reset too. A resource alarm blocks a connection that publishes: the reader stops to read
412
+ * its socket, and the receive check pauses.
413
+ */
414
+ export declare const RABBITMQ_CONNECTION: Machine;
415
+ //#endregion
340
416
  //#region src/sentinel.d.ts
341
417
  /**
342
418
  * This document is the Sentinel of Valkey 9.1.2. It gives the view of one Sentinel on the primary