<feed xmlns='http://www.w3.org/2005/Atom'>
<title>pure/docs/design/017-apps-on-one-host.md, branch master</title>
<subtitle>Verified execution runtime unifying state, persistence, and replication.
</subtitle>
<id>http://git.yeowoo.org/pure/atom?h=master</id>
<link rel='self' href='http://git.yeowoo.org/pure/atom?h=master'/>
<link rel='alternate' type='text/html' href='http://git.yeowoo.org/pure/'/>
<updated>2026-10-04T11:58:53Z</updated>
<entry>
<title>Say what an app's tokens cost (017 3b, research 116)</title>
<updated>2026-10-04T11:58:53Z</updated>
<author>
<name>eunhhu</name>
<email>necpition205@gmail.com</email>
</author>
<published>2026-10-04T11:58:53Z</published>
<link rel='alternate' type='text/html' href='http://git.yeowoo.org/pure/commit/?id=21bf7dbf9a388fdb73e76118eeb8144b51f2481c'/>
<id>urn:sha1:21bf7dbf9a388fdb73e76118eeb8144b51f2481c</id>
<content type='text'>
Requests to an app that checks tokens go 2.92% slower than to an open
one on 64 keep-alive connections, 2.2% of it the head the token makes
longer (an open app sent the same head is as slow); hashing every
request on a new connection costs 0.91%. 031 measures the three in
turns.
</content>
</entry>
<entry>
<title>Say how an app's routes take tokens, and what it must show (017, 3b)</title>
<updated>2026-10-04T11:37:32Z</updated>
<author>
<name>eunhhu</name>
<email>necpition205@gmail.com</email>
</author>
<published>2026-10-04T11:37:32Z</published>
<link rel='alternate' type='text/html' href='http://git.yeowoo.org/pure/commit/?id=1ff4fd3b1ae2b2ada273d7ffaee8501c9d43d5c0'/>
<id>urn:sha1:1ff4fd3b1ae2b2ada273d7ffaee8501c9d43d5c0</id>
<content type='text'>
An app given a tokens file (tokens=FILE, --tokens FILE) takes requests
bearing a token whose SHA-256 the file lists: read for its views, queries
and documents, write for all, input=NAME for one input alone; 401
without one, 403 past its grant. A delivery another node sealed needs
none: its key told who sent it. A connection keeps its last token's
grant; a reading swaps the tokens without stopping the app.
</content>
</entry>
<entry>
<title>Say that reading the code found stage 3's two races, and how a host changes apps</title>
<updated>2026-10-04T10:11:00Z</updated>
<author>
<name>eunhhu</name>
<email>necpition205@gmail.com</email>
</author>
<published>2026-10-04T10:11:00Z</published>
<link rel='alternate' type='text/html' href='http://git.yeowoo.org/pure/commit/?id=91bb0dc2f471f7fb90d7d5bc08c87805dceac326'/>
<id>urn:sha1:91bb0dc2f471f7fb90d7d5bc08c87805dceac326</id>
<content type='text'>
The use after free in local_done and the owner's lock made after another
app's outlet used it were found reading the code, not by the check,
which passed with both before it was made to change senders (115, 017).
The usage now says changed lines change in place unless their store
moved; and 115 names the path no check takes: a module refused while
changing in place.
</content>
</entry>
<entry>
<title>Say what apps that change on a running host showed (017 stage 3, research 115)</title>
<updated>2026-10-04T10:07:55Z</updated>
<author>
<name>eunhhu</name>
<email>necpition205@gmail.com</email>
</author>
<published>2026-10-04T10:07:55Z</published>
<link rel='alternate' type='text/html' href='http://git.yeowoo.org/pure/commit/?id=52e51e4231f2e119c97826ae6d6e2f2af0da0c58'/>
<id>urn:sha1:52e51e4231f2e119c97826ae6d6e2f2af0da0c58</id>
<content type='text'>
Changing an app in place keeps a million items' app answering but for
1.12 ms (a host restart: 150 ms; stopping and starting it again from its
store, as first built, 150.4 ms), 171.5 ms when its records change shape
(332 ms). Another app's p99 stays 0.97 times as it was while one changes
every 0.2 s; a host of one app is as it was (TPC-C +0.7%, instructions
at most +0.02%); each module change leaves 19 KB. 030 holds the windows
of both builds, the isolation, the pairs, the counts and the memory.
</content>
</entry>
<entry>
<title>Say how apps start, stop and change on a running host, and what it must show (017, stage 3)</title>
<updated>2026-10-04T08:53:17Z</updated>
<author>
<name>eunhhu</name>
<email>necpition205@gmail.com</email>
</author>
<published>2026-10-04T08:53:17Z</published>
<link rel='alternate' type='text/html' href='http://git.yeowoo.org/pure/commit/?id=a90fdcd8932f1b876955c93dbbe13fbec8454007'/>
<id>urn:sha1:a90fdcd8932f1b876955c93dbbe13fbec8454007</id>
<content type='text'>
The --apps file is the host's shape: on SIGHUP the host reads it again
and starts the apps of new lines, stops those of lines gone, starts
again those whose line changed (states carried by name from the store)
and those stopped or uncertain. A request carries the module it was
resolved with, and is not applied under another (503 stopped); link
streams and local outlets look their input up again. Route
authentication (3b) is designed apart.
</content>
</entry>
<entry>
<title>Say what one sending loop showed (017 2b, research 113)</title>
<updated>2026-10-01T08:18:23Z</updated>
<author>
<name>eunhhu</name>
<email>necpition205@gmail.com</email>
</author>
<published>2026-10-01T08:18:23Z</published>
<link rel='alternate' type='text/html' href='http://git.yeowoo.org/pure/commit/?id=83286a0722be240690c134d9c6c75b2da6e94e8a'/>
<id>urn:sha1:83286a0722be240690c134d9c6c75b2da6e94e8a</id>
<content type='text'>
The loop alone slowed four links to half: woken by every record queued,
it chased the owner a record at a time. Pushing once a turn made links
1.6 times as fast, with threads or the loop alike; the loop's own cost
is within the noise. Twenty outputs now add two threads, not 21.
</content>
</entry>
<entry>
<title>Say how sends will share one loop, and what it must show (017, 2b)</title>
<updated>2026-10-01T07:33:47Z</updated>
<author>
<name>eunhhu</name>
<email>necpition205@gmail.com</email>
</author>
<published>2026-10-01T07:33:47Z</published>
<link rel='alternate' type='text/html' href='http://git.yeowoo.org/pure/commit/?id=966b82f0baf8d92e1c16e1767df63cce160fafe1'/>
<id>urn:sha1:966b82f0baf8d92e1c16e1767df63cce160fafe1</id>
<content type='text'>
Each link and each HTTP wire sends on a thread of its own: a host with
twenty outputs runs twenty-one threads more than one without. 2b moves
them into one sending loop: an epoll over the links' UDP sockets and
the wires' TCP sockets with one wake, waiting until the soonest link
timer or wire pause. Links (2b-1) do in the loop what their threads
did each round; wires (2b-2) become a non-blocking HTTP/1.1 client
state machine, with non-blocking steps added to the crypto table for
TLS. A name looked up again still waits where it is, and says so.

Before building: every link, wire, answer and seal check green; a host
of ten links and ten wires two threads above one without; and link and
wire throughput, alternated before and after, no more than 5% lower at
the median (four links together: 10%).
</content>
</entry>
<entry>
<title>Say that apps of a host send to each other and to other nodes (017)</title>
<updated>2026-10-01T06:05:51Z</updated>
<author>
<name>eunhhu</name>
<email>necpition205@gmail.com</email>
</author>
<published>2026-10-01T06:05:51Z</published>
<link rel='alternate' type='text/html' href='http://git.yeowoo.org/pure/commit/?id=02aa5c752cb4704c7b8941c2e58acc359034272a'/>
<id>urn:sha1:02aa5c752cb4704c7b8941c2e58acc359034272a</id>
<content type='text'>
Stage 2 is built and measured: what was learned (the receiving side
needed nothing new, an output goes one way only) and the numbers. The
checkpoint adds sending to the many-apps row, and keeps 2b (one loop
for the send threads) and stage 3 (apps added and replaced while the
host runs) among what is left.
</content>
</entry>
<entry>
<title>Say how apps will send to each other and to other nodes, and what it must show (017)</title>
<updated>2026-10-01T05:50:09Z</updated>
<author>
<name>eunhhu</name>
<email>necpition205@gmail.com</email>
</author>
<published>2026-10-01T05:50:09Z</published>
<link rel='alternate' type='text/html' href='http://git.yeowoo.org/pure/commit/?id=56e4a08b03d50f3afdeca7f97f6d46b50f359508'/>
<id>urn:sha1:56e4a08b03d50f3afdeca7f97f6d46b50f359508</id>
<content type='text'>
Stage 2: each app of --apps takes its wiring (send=, seal=, reply=), its
sends' source being APP.OUTPUT; one --link-port takes every app's
inputs, a stream's input name APP/INPUT (012 unchanged); and send=
OUTPUT=APP/INPUT hands an app's saved sends to another app of the same
host with no socket, seal or packet: an outlet with the window links
have, a batch of records as a link delivers them put in the receiving
app's queue, applied after its last number heard, and the number heard
after its save trimming the sender's outbox. Merging the send threads
into one loop is split off as 2b.

Before building: it goes in if the inner outlet stores at least as many
sends a second as a loopback pure:// link between the same two apps,
at half the host's CPU a stored send or less; checked by a host sending
to an app of its own and to one of another host, exactly once and in
order across a kill -9, and held back by a full receiver.
</content>
</entry>
<entry>
<title>Say that one host runs many apps, and what its first stage found (017)</title>
<updated>2026-10-01T05:25:21Z</updated>
<author>
<name>eunhhu</name>
<email>necpition205@gmail.com</email>
</author>
<published>2026-10-01T05:25:21Z</published>
<link rel='alternate' type='text/html' href='http://git.yeowoo.org/pure/commit/?id=b146696c7df9834fdb4288cca2e209b1ed544fe9'/>
<id>urn:sha1:b146696c7df9834fdb4288cca2e209b1ed544fe9</id>
<content type='text'>
017's first stage is built and measured: the shape now says what was
built where it differs from the design (work counted as written,
nothing counted without a budget, every app of --apps run by workers,
a busy app kept on its worker, a home thread for each app's
connections), and what was learned on the way. The checkpoint lists
many apps on one host among what Pure shows, and stages 2 and 3 among
what is left.
</content>
</entry>
</feed>
