The two changes to the wire between followers and gateways that were owed as trials, each built to be judged. The wire has no public revision, so neither costs one.
A gateway has to know which requests an event stream has answered: a stream given up part-way gets a last
message for the requests still owed one, and none for those that have theirs. It learned this by reading each
part of a node's answer back as JSON — data: and then a message or a batch — which made one frame to a
write a rule the node's transport had to keep for the gateway's sake, and had the gateway parse every
heartbeat that passed through it.
Now the transport says which responses a write carries, on a tunnelled exchange, just ahead of that write; the
follower sends the ids with the part, in X-Answers; and the gateway counts them once the part is with the
client. It reads nothing of what it carries.
The case it was to be judged by: a result flushed to the client, and the gateway's acknowledgement of that part lost on the way back to the follower.
A response split over two writes is counted with the write that says so, which the reading could not do.
What it cost: a header on one part of an answer, a function of six lines in the transport that knows a tunnelled exchange from another, and a rule in place of the one removed — the transport says what a write answers on the thread that then makes the write, with no other writer between, which is the discipline frames were already written under.
| Removed | Failing assertions |
|---|---|
| The transport saying what a write answers | 5 |
| The follower passing it on with the part | 5 |
| The gateway counting what a part says it answers | 2 |
The welcome — the wire's revision, the attachment's id, what the follower must drop, the cadence — was the
first event of the attach's stream. It is now X-Welcome in the head of the response, the same object.
What went with the event is the attach that is answered and not yet welcomed. A follower read a stream it was not attached to, waiting; nothing the stream brought counted as hearing from the gateway until the welcome did; a watch dropped the attach after three opening beats, 3.99 s at the default timings; and an event ahead of the welcome was a refusal of its own. Now the answer is the welcome or it is nothing, and one that carries none is dropped as it arrives and nothing is read from it.
Three things it did not deliver, or delivered at a price:
A follower that stops with the answer in hand takes no welcome. With the event that fell out of the body being closed under it; with the head it is asked. The removal of that failed nothing at first, the test of a late welcome being of an attach cancelled before it is answered, and a test now stops the follower with the welcome read and not yet taken.
| Removed | Failing assertions |
|---|---|
| The gateway putting the welcome in the head | 31, and 1 error |
| The follower refusing an answer in another revision, or none | 2 |
| The follower refusing an answer that names no attachment | 2 |
| A stopped follower taking no welcome | 1 |
Between the two JVMs: the follower attached, kept the gateway's cadence of 5 s as the head gave it, and a session opened on it through the gateway served evals.
The suite is 246 tests and 966 assertions, run twice without a failure.
Can you improve this documentation?Edit on GitHub
cljdoc builds & hosts documentation for Clojure/Script libraries
| Ctrl+k | Jump to recent docs |
| ← | Move to previous article |
| → | Move to next article |
| Ctrl+/ | Jump to the search field |