A host put the gateway in front of development servers and drove it with Claude Code, on the commit of the entry before this on both sides. This is its report, set down here. None of it was observed from this checkout: where it says what Remontoire did, that is what was seen from outside, by the agent that built the deployment and then used it. What is said here of the source was read in it afterwards.
No defect was found. The trials before this were between JVMs on one machine, or two machines on one local network with sleep and partition simulated. This one had a real suspend, an overlay network, and a client that connected to a server already a gateway.
-main that calls init! with
:gateway? true and waits, with Clojure and this library alone on its classpath, under a 192 MB heap.:follow and no :name, so it attaches under its hostname, which is what people
already called the machine.Never more than one follower was attached.
Wall-clock from the client, single runs. "Earlier form" is the private network.
| The application started | attached by itself under its hostname |
A session opened with node, and evals with printed output | answered as they are directly |
| An eval of 16 s (earlier form) | followed as an MCP task to its end, through the gateway |
| 25 bytes uploaded to the address the session gave, which was the gateway's (earlier form) | read back on the node |
The follower's machine hibernated with a session open, and a (__r.gw/change seen) waiting in a gateway session | settled with the node no longer attached, within 18 s of the sleep being asked for, in both forms |
| A call to the node's session while it slept | refused, with the reason and how to wait |
| The machine woken | attached by itself, 2 s after the wake command returned |
A (__r.gw/node "…") made before the wake | settled 49 s after it was made, 58 s in the earlier form: the time the machine took to resume |
| The session after the resume | the same id answered, with a value defined in it before the suspend |
| The gateway's process restarted with a node's session open | the session answered through the new gateway 5 s later, 6.5 s in the earlier form |
| A session of the gateway's own after that restart (earlier form) | refused, and the refusal said why |
| The gateway's process with one follower attached (earlier form) | about 100 MB, 96 and 113 by two measures |
The client did not reconnect at any point: not across the suspend and resume, and not across the gateway's restart.
The 18 s is an upper bound, counted from the command and not from when the JVM froze. It sits in the ten to twenty seconds §15 expects of noticing. Whether a failed write or the silence ended the attachment was not looked at, nor whether the name was free by the time the machine came back for it or had to be taken from a holder that did not answer.
Right after the gateway's restart the client's first call was refused at the socket, and the next was answered. Whether an answer of "not known here yet" came in between was not recorded.
create-session advertised node, and the connect-time intro said the server was a gateway, that
create-session takes a node, and that (__r.gw/nodes) lists those attached. The agent used the gateway on
that and read nothing else first. It had built the deployment and knew the node's name, and the host's
:describe gave the naming rule, so this is not a client arriving cold.
The refusal for a sleeping node was acted on as written: a session on the gateway, (__r.gw/node "name"), and
the task settled when the machine was back. The agent's own word for the two waits was that they replaced
polling.
node
evaluates in the gateway's JVM for whoever reaches the port, and that process held credentials. It runs
sandboxed in a process of its own: a user made for it, and no network but the overlay. The host's suggestion
is a gateway that offers the fleet and its waits and evaluates nothing. §15 has it under Open, with how it
could be done.create-session answers
with it as data from this entry on.The host's followers are builds of different ages, weeks apart, dialling one gateway that changes rarely, and it had run one case: both at one commit. It asked what a follower on another revision of the wire sees and does, and whether the wire holds across releases.
Read in the source: the gateway answers such an attach 409, naming both revisions, before taking anything from it. The follower prints that once, since it prints when the news changes and not at every attempt, and asks again every second for as long as it runs. Its own endpoint is untouched.
Decided with this entry, and written into §15, the README and the changelog: the revision changes only when what the two say to each other changes so that one would misread the other, the changelog names the release that changes it, and releases with no such change between them attach to each other in either order. A gateway speaks one revision, so a fleet crosses a change together. A gateway speaking several was not built. Between commits that are not releases the number promises nothing, which is why the host holds both sides to one commit for now.
The host also relied on a release from before gateways taking no notice of :follow, having run 0.8.2, and
assumed it of 0.10.0. That holds, by reading the tag: its init! merges the options over the defaults,
nothing reads the key, and no key is refused. The same reading says a host cannot tell from such an init!
that it asked for something it did not get.
Not ours to change, and noted for whoever upgrades across it: 0.10.0 moved the session from a header to an argument, each side refuses the other's way, and a host with scripts of its own had to ship them and the library in one deploy. The changelog of 0.10.0 says what changed.
A gateway built from a commit reports the version of the last release, as its followers do, so the roster does not tell two unreleased builds apart.
More than one follower at once. A suspend of hours or days. The gateway's machine replaced by another under the same name. A network that loses packets. Two revisions of the wire meeting. A second machine claiming a sleeping node's name. A client that did not already know the node's name. The upload, the long eval as a task, the idle check and the refusal after a restart were seen in the earlier form only.
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 |