@mark1russell7/machines 0.3.14 → 0.3.16

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
@@ -50,8 +50,13 @@ The algebra reads these documents. It gives the closed form of each timer, the f
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
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
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 |
55
+ | `GRPC_JS` | `grpc-js` | grpc-js 1.14.6: one channel to a gRPC server, its HTTP/2 transport, its keepalive and a unary call | driver | 26 implemented, 1 observed |
56
+ | `GRPC_GO_SERVER` | `grpc-go-server` | A server of grpc-go v1.84.0: one HTTP/2 connection, its keepalive, its policy for PINGs and its TCP socket | server | 13 implemented, 1 documented |
57
+ | `ETCD_SERVER` | `etcd-server` | The server of etcd v3.6.15 on grpc-go v1.83.2: one gRPC connection of a client | server | 19 implemented, 1 documented |
53
58
 
54
- Twenty-one 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.
59
+ Twenty-four 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.
55
60
 
56
61
  The package also gives these parts:
57
62
 
@@ -97,6 +102,19 @@ A change to the version of a system changes its sources too. Each fact of the do
97
102
 
98
103
  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.
99
104
 
105
+ ### 0.3.16
106
+
107
+ - **gRPC: grpc-js 1.14.6, a server of grpc-go v1.84.0, and the server of etcd v3.6.15.** Three new documents, each from the source at its tag:
108
+ - `grpc-js`: one channel, its transport and a unary call. At the defaults the keepalive is off, a call has no deadline, and the connect has no timeout. grpc-js sets TCP_NODELAY and no TCP keepalive. When the transport ends, each call in flight ends with UNAVAILABLE, and grpc-js does not retry it.
109
+ - `grpc-go-server`: one connection of a server of grpc-go. The server sends a PING after 2 h with no read, and it closes the connection 20 s after it. Its keepalive is on, thus each accepted connection gets a TCP_USER_TIMEOUT of 20 s. With the TCP keepalive of Go (15 s, 15 s, 9), an idle connection to a client that is gone ends 30 s after the last data. The third PING that breaks the policy gives GOAWAY too_many_pings. A call with a deadline gets a timer of it at the server, which resets the stream at its end. Thus the deadline of grpc-js and the deadline at the server race: run 39272272260 ended 4 of 11 such calls with CANCELLED, not DEADLINE_EXCEEDED.
110
+ - `etcd-server`: the same transport with the values of etcd. A client can ping each 5 s with a stream open. etcd serves gRPC through cmux, thus its connections get no TCP_USER_TIMEOUT. Its listener sets the keepalive idle to 30 s: an idle connection to a client that is gone ends 165 s after the last data.
111
+
112
+ ### 0.3.15
113
+
114
+ - **The cluster of a quorum queue of RabbitMQ 4.3.6.** Two new documents, each from the source in the release of RabbitMQ:
115
+ - `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.
116
+ - `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.
117
+
100
118
  ### 0.3.14
101
119
 
102
120
  - **amqplib 2.2.0 and RabbitMQ 4.3.6.** Two new documents, each from the source at its tag:
package/build/index.d.ts CHANGED
@@ -1,4 +1,40 @@
1
1
  import { Expr, Machine } from "@mark1russell7/algebra";
2
+ //#region src/grpc/grpc-go-server.d.ts
3
+ /**
4
+ * This document is a server of grpc-go v1.84.0 on its own listener: grpc.NewServer on net.Listen, at the
5
+ * defaults, as in the server of the harness. Its keepalive is on (a PING after 2 h with no read). Thus the
6
+ * transport gives each accepted connection a TCP_USER_TIMEOUT of 20 s. With the TCP keepalive of Go
7
+ * (15 s, 15 s, 9), an idle connection to a client that is gone ends 30 s after the last data. A client
8
+ * that pings more often than 5 min with a stream open, or than 2 h with none, gets GOAWAY
9
+ * too_many_pings at its third strike.
10
+ */
11
+ export declare const GRPC_GO_SERVER: Machine;
12
+ /**
13
+ * This document is the server of etcd v3.6.15, on grpc-go v1.83.2, at the defaults: one client URL with no
14
+ * TLS. The keepalive of the server is 2 h and 20 s, and a client can ping each 5 s with a stream open.
15
+ * The server serves gRPC and HTTP on one port through cmux. Thus the transport gets a wrapper of the conn,
16
+ * and it sets no TCP_USER_TIMEOUT. The listener sets the keepalive idle to 30 s. The interval and the
17
+ * count of Go stay. Thus an idle connection to a gone client ends 165 s after the last data: 30 + 9 × 15.
18
+ */
19
+ export declare const ETCD_SERVER: Machine;
20
+ //#endregion
21
+ //#region src/grpc/grpc-js.d.ts
22
+ /**
23
+ * This document is grpc-js 1.14.6 on Node, for one channel to one server with no TLS, its transport
24
+ * (one HTTP/2 session on one TCP connection) and one unary call on it. It gives the states of the
25
+ * transport, from its connect to its end, and the timers that act on it.
26
+ *
27
+ * At the defaults the keepalive of grpc-js is off: it sends no PING. It sets TCP_NODELAY and no TCP
28
+ * keepalive, and its connect has no timeout. A call has no deadline. Thus nothing in grpc-js ends a
29
+ * call on a silent connection: only the kernel can, or the server.
30
+ *
31
+ * When the transport ends, each call in flight on it ends with UNAVAILABLE. The client does not retry such
32
+ * a call, because the call reached the server (PROCESSED). It retries only a call that did not start, and
33
+ * once a stream that the server refused. The channel then goes IDLE, and the next call connects again. A call
34
+ * that finds the channel in TRANSIENT_FAILURE fails at once, unless it asks to wait for the channel.
35
+ */
36
+ export declare const GRPC_JS: Machine;
37
+ //#endregion
2
38
  //#region src/http/go-transport.d.ts
3
39
  /**
4
40
  * This document is one connection of the `http.Transport` of Go 1.27.2 at its defaults, over its
@@ -355,6 +391,47 @@ export declare const PROCEDURES_WS_SERVER: Machine;
355
391
  */
356
392
  export declare const AMQPLIB: Machine;
357
393
  //#endregion
394
+ //#region src/rabbit/aten.d.ts
395
+ /**
396
+ * This document is aten 0.6.0, the failure detector between the nodes of RabbitMQ 4.3.6. It gives one
397
+ * node that another node watches: up or down, as the detector of the watching node sees it.
398
+ *
399
+ * Each node sends a heartbeat to each connected node each 100 ms. The sink of the watching node keeps
400
+ * the gaps between the heartbeats of each node. Its detector polls each 5000 ms: aten polls each 1000 ms
401
+ * by its own default, and RabbitMQ sets 5000 ms, for fewer false elections.
402
+ *
403
+ * At a poll, the probability of a failure is a share of the gaps. A gap counts when 1.5 times the gap
404
+ * is not longer than the time since the last heartbeat. The node is down when that share reaches 0.99.
405
+ * With gaps of approximately 100 ms, that is approximately 150 ms after the last heartbeat, at the first
406
+ * poll after it. Thus a silent node is down 150 ms to approximately 5.2 s after its last heartbeat,
407
+ * long before the tick of the distribution.
408
+ *
409
+ * A closed connection of the distribution (a stopped node) removes the data of the node from the
410
+ * sink. The next poll then reports the node down.
411
+ */
412
+ export declare const ATEN_DETECTOR: Machine;
413
+ //#endregion
414
+ //#region src/rabbit/ra-member.d.ts
415
+ /**
416
+ * This document is ra 3.1.10, for one member of the Raft cluster of a quorum queue of RabbitMQ 4.3.6.
417
+ * It gives the roles of the member, the election timers, and the change of leader.
418
+ *
419
+ * A follower watches the node of its leader with aten. When aten reports that node down, the follower
420
+ * arms a long election timeout. The timeout is the poll interval of aten, 5 s in RabbitMQ, and a random
421
+ * part up to 1 s. A valid message of the leader cancels it. When the timeout fires, the follower asks for pre-votes in
422
+ * its term.
423
+ *
424
+ * A member grants a pre-vote when the log of the candidate is not behind its own. A member that is
425
+ * still a follower of a live leader grants it too. A majority of pre-votes makes a candidate. The
426
+ * candidate starts a new term and asks for votes, and a majority makes it the leader. The new leader
427
+ * of the queue tells each publisher of the queue. Then the channel of each publisher sends its pending
428
+ * publishes again to the new leader.
429
+ *
430
+ * A leader ignores the events of aten. Thus a leader that loses the majority stays the leader in its
431
+ * minority, and it commits nothing, until it sees a higher term.
432
+ */
433
+ export declare const RA_MEMBER: Machine;
434
+ //#endregion
358
435
  //#region src/rabbit/rabbitmq-connection.d.ts
359
436
  /**
360
437
  * This document is RabbitMQ 4.3.6, for one connection of AMQP 0-9-1 on the broker. It gives the reader of