Effectful ITransport: a long-lived OS process running the opaque kernel binary, spoken to over line-oriented EDN on its stdin and stdout.
This is the transport a marketplace artifact actually mounts through. The process is LONG-LIVED on purpose: a cljw binary costs roughly 36ms to start, which is invisible once per mount and ruinous once per tool call.
JVM-only (.clj, not .cljc). It is the one namespace in the opaque subsystem that names host classes, which is precisely why the seam above it is a protocol: nothing else has to care that this exists.
The kernel's stderr is INHERITED rather than piped. A piped stderr that nobody drains fills its buffer and deadlocks the kernel mid-call, and a proprietary binary's diagnostics belong in the host's log anyway.
Effectful ITransport: a long-lived OS process running the opaque kernel binary, spoken to over line-oriented EDN on its stdin and stdout. This is the transport a marketplace artifact actually mounts through. The process is LONG-LIVED on purpose: a cljw binary costs roughly 36ms to start, which is invisible once per mount and ruinous once per tool call. JVM-only (.clj, not .cljc). It is the one namespace in the opaque subsystem that names host classes, which is precisely why the seam above it is a protocol: nothing else has to care that this exists. The kernel's stderr is INHERITED rather than piped. A piped stderr that nobody drains fills its buffer and deadlocks the kernel mid-call, and a proprietary binary's diagnostics belong in the host's log anyway.
(subprocess-transport argv)An ITransport that runs argv as a subprocess on first -start!. argv is
the whole command vector (executable first), so a kernel that needs flags,
a licence file path or a data directory gets them without this namespace
knowing what any of them mean.
An ITransport that runs `argv` as a subprocess on first -start!. `argv` is the whole command vector (executable first), so a kernel that needs flags, a licence file path or a data directory gets them without this namespace knowing what any of them mean.
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 |