Commit Graph

217 Commits

Author SHA1 Message Date
Philip Monk
cc94abf717
eyre: cancel subscriptions more aggressively 2019-11-13 01:21:14 -08:00
Philip Monk
4a6e98a558
mall, eyre: refactor server apps to be stateless 2019-11-13 00:38:35 -08:00
Philip Monk
47e3b260d5
eyre: subscribe to apps for responses
This removes the %http-response special case from gall.  In its place,
we implement a subscription regime with the following steps:

- Agent sends %connect to Eyre
- Eyre pokes agent with %handle-http-response, including unique eyre-id
- Agent passes %start-watching to Eyre with eyre-id and unique app-id
- Eyre subscribes to agent on /http-response/app-id
- Agent produces a %http-response-header fact followed by 0 or more
  %http-response-data facts and possibly a %http-response-cancel fact
- Agent produces a %kick to close the subscription, which Eyre
  interprets as completion of the message.

This works when there is data.  There is currently a bug where if the
response has no data in total (as in the case of a naked 404), no
response will be sent.

This also includes lib/http-handler, which implements a convenient
interface for agents that want to respond immediately with all the data.
This lets them avoid carrying extra state to keep track of pending
requests.

This should really have access to your state and the ability to change
it.  Perhaps a more minimalist design would be better: just keep track
of the requests, then hand it off to +on-watch when eyre is ready to
receive responses.  It's not clear how to pass in the request data in
+on-watch.
2019-11-12 23:37:38 -08:00
Philip Monk
e603681097
clay: fix meet-conflict crash 2019-11-10 14:33:48 -08:00
Philip Monk
ae295d445a
mall: rm old apps for easier merging 2019-11-09 16:53:42 -08:00
Philip Monk
bcd7c5e82d
Merge branch 'master' into philip/mall-real 2019-11-09 16:47:41 -08:00
Philip Monk
7c4316fce4
mall: refactor gift/sign/task types
+on-agent now takes a +sign:agent:mall, which doesn't include spurious
options.  Similarly, +task:agent:mall is smaller.
2019-11-08 17:35:24 -08:00
Philip Monk
1688fe82fd
mall: add flag to default-agent to assist with errors 2019-11-08 13:56:35 -08:00
Philip Monk
d096c18377
mall: properly delete on %kick 2019-11-07 18:25:19 -08:00
Philip Monk
67ef0ed0f7
mall: don't remove sub until sent kick 2019-11-07 16:30:45 -08:00
Philip Monk
68a7f58447
mall: set attributing to immediate source 2019-11-07 14:46:06 -08:00
Philip Monk
9d2585772d
mall: fan out kicks 2019-11-07 13:17:13 -08:00
Philip Monk
43be7737d6
mall: rename agent arms 2019-11-07 00:19:58 -08:00
Philip Monk
23f99e8f85
jael: don't update state until you've tested for breach
We were updating our state and then using that when checking if the rift
had incremented.  This would never be true, since we'd already set the
new state.

Fixes #1852 again
2019-11-06 12:51:33 -08:00
Jared Tobin
24f6309670
Merge branch 'behn-flop-drip' (#1916)
* behn-flop-drip:
  behn: print %drip errors in the correct order

Signed-off-by: Jared Tobin <jared@tlon.io>
2019-11-06 18:31:45 +08:00
Philip Monk
46d89dd823
mall: convert dns-collector 2019-11-05 19:55:51 -08:00
Joe Bryan
cafb58b080 dill: fixes cursor position during boot 2019-11-05 14:56:15 -08:00
Joe Bryan
5ace479711 dill: adds %goad automation 2019-11-05 14:56:10 -08:00
Joe Bryan
c930aceec6 dill: refactors move production 2019-11-05 13:08:10 -08:00
Joe Bryan
d852d4f159 gall: restores "not-running" printf 2019-11-05 13:04:27 -08:00
Joe Bryan
1b187657cb gall: adds %goad task force agent rebuilds 2019-11-05 13:04:27 -08:00
Joe Bryan
6ccc8b65d5 behn: print %drip errors in the correct order 2019-11-05 00:22:53 -08:00
Philip Monk
0e2da1e130
mall: convert lanaguage-server 2019-11-04 23:47:27 -08:00
Philip Monk
274d518cbc
mall: forward-port gall changes 2019-11-04 20:19:08 -08:00
Philip Monk
82513c27fc
Merge branch 'master' into philip/mall-real 2019-11-04 19:35:24 -08:00
Joe Bryan
ec32a76596 gall: fix virtualization of agent compilation 2019-11-04 15:29:17 -08:00
Anton Dyudin
78d10f30cd
eyre: fix wire=path terminology 2019-10-25 16:04:29 -07:00
Jared Tobin
7f124db8d9
Merge branch 'philip/jael-ames-full' (#1882)
* philip/jael-ames-full:
  jael: provide edge-triggered breach notification

Signed-off-by: Jared Tobin <jared@tlon.io>
2019-10-25 14:05:01 +08:00
Philip Monk
9ddc04143a
jael: provide edge-triggered breach notification
Until now, clients of Jael have had to store the first-seen rift if they
want to reliably detect breaches.  Otherwise, they would get a false
positive if they heard an old message about a breach (eg if you kick
azimuth-tracker).  Clay and Gall did this correctly, but Ames did not.

Jael already maintains this state, so I added a notification to the
existing subscription that happens whenever it notices a breach (a diff
or full where the new rift is greater than the old one).

Because this is an issue on the live network, I wrote state adapters
for Gall and Clay.  The Gall one just removes the rift from our state,
but the Clay one is much more involved because we have to upgrade
instances of the clad monad that are possibly in progress.
Specifically, since more input is possible than before, we must wrap any
in-progress instances of the monad in a function that handles the
potential new input from Jael.  This temporarily preservers a copy of
the old kernel, but only until the current commit/merge/update has
completed.

The real solution for Clay is to factor out those IO-heavy instances to
userspace tapp/async/imp/threads, and if an upgrade happens in the
middle, you should simply restart them.

Fixes #1852
2019-10-23 21:40:34 -07:00
Jared Tobin
bdfc270b2f
gall: fix bug in +ap-peek
fc7901d2 refactored much of +ap-peek, but introduced a bug in the
process.  The relevant diff from that commit is as follows:

  -        =/  =path  [ren tyl]
  -        =/  =vase  !>((slag p.u.cug path))
  -        (ap-slam q.u.cug p.arm vase)
  +        =/  index  p.u.maybe-arm
  +        =/  term  q.u.maybe-arm
  +        =/  =vase
  +          =/  =path  [term tyl]
  +          =/  raw  (slag index path)
  +          !>  raw
  +        (ap-slam term p.arm vase)

Note that [ren tyl] was replaced with [term tyl], where 'term' and 'ren'
are not equal.  This commit merely rights that wrong.
2019-10-22 15:22:30 +08:00
Philip Monk
87f689f443
custody: add more types 2019-10-21 15:41:28 -07:00
Philip Monk
be212ad54b
ames: better stack traces 2019-10-17 16:52:35 -07:00
Philip Monk
f835ef5a70
ames: don't crash 2019-10-17 12:33:35 -07:00
Jared Tobin
70ed0d6e98
Merge branch 'philip/jael-fix' (#1827)
* philip/jael-fix:
  jael: retrieve first sponsor instead of last

Signed-off-by: Jared Tobin <jared@tlon.io>
2019-10-16 10:06:09 +04:00
Philip Monk
6b8d75a88c
jael: retrieve first sponsor instead of last 2019-10-15 18:04:34 -07:00
Jared Tobin
f0a0c66afd
ames: bump protocol version
A last-minute adjustment to the v0.9.0 release to ensure that ships in
the next era don't become haunted by ghosts of the past one.
2019-10-15 22:32:55 +04:00
Jared Tobin
ac55d362e9
Merge branch 'ames-boot-timer' (#1817)
* ames-boot-timer:
  pills: update solid
  ames: skip timers if unix duct is unset

Signed-off-by: Jared Tobin <jared@tlon.io>
2019-10-11 11:08:35 +04:00
Joe Bryan
e9396973cc ames: skip timers if unix duct is unset 2019-10-10 17:21:39 -07:00
pkova
92cc039155 eyre: fix missing cancel-heartbeat-move cases 2019-10-10 20:59:39 +03:00
pkova
a019c2079e eyre: add channel \n heartbeat every 20 seconds 2019-10-07 03:11:11 +03:00
Jared Tobin
8aeaf1610b
Merge branch 'behn-log-drip-fail' (#1795)
* behn-log-drip-fail:
  updates solid pill
  behn: print error on failed %drip
2019-10-05 16:28:20 +04:00
Isaac Visintainer
e9c639464b eyre: changed cookie format 2019-10-04 15:06:01 -07:00
Philip Monk
d202a4fb56 behn: print error on failed %drip 2019-10-04 14:05:52 -07:00
Joe Bryan
ef959e0c52 gall: clear caches in response to memory pressure 2019-10-01 15:04:07 -07:00
Joe Bryan
1e9cc07649 eyre: close channels in response to memory pressure 2019-10-01 15:04:03 -07:00
Joe Bryan
8ff445c68c ford: clear caches in response to memory pressure 2019-10-01 11:35:08 -07:00
Philip Monk
9fc28a9538
mall: populate wex.bowl with outgoing subscriptions
fixes #1466
2019-09-30 20:53:12 -07:00
Jared Tobin
21c3119660
gall: remove %gall-booting printf
%gall currently prints

  [%gall-booting <app> p=<ship> q=<desk>]

whenever it receives a %conf (i.e., when it boots an app).  This turns
up in many of the places the old, less-informative '%mo-not-running'
printf did, but it's of similarly little use, and mainly serves to
create redundant line noise.  This commit just removes it.
2019-09-30 01:58:28 +04:00
Jared Tobin
2add146302
Merge branch 'reclamation' (#1773)
* reclamation:
  solid pill
  arvo: wires up %trim memory-pressure event stubs
  u3: wires up the %trim event in the daemon
  u3: adds %trim memory-pressure notification "effect"
  u3: tweaks |mass output (and fixes inadvertent truncation)
  u3: refactors periodic memory reclamation
  u3: factors out u3a_idle() to measure free-lists in a road
  u3: adds and uses u3a_full/heap/temp road macros
  u3: cleans up whitespace, removes dead code in allocator
2019-09-29 21:30:56 +04:00
Jared Tobin
5c99f33271
Merge branch 'ted/verb' (#1754)
* ted/verb:
  update pill
  hood: |knob {tag} {level} to set dill verbosity
  dill: set verbosity by error tag
2019-09-29 21:09:05 +04:00