shrub/pkg/arvo/sys/vane
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
..
alef.hoon hoon: replace barhax with barbus 2019-09-11 01:20:21 -07:00
ames.hoon Merge branch 'master' into philip/mall-real 2019-11-04 19:35:24 -08:00
behn.hoon behn: print %drip errors in the correct order 2019-11-05 00:22:53 -08:00
clay.hoon clay: fix meet-conflict crash 2019-11-10 14:33:48 -08:00
dill.hoon eyre: subscribe to apps for responses 2019-11-12 23:37:38 -08:00
eyre.hoon eyre: subscribe to apps for responses 2019-11-12 23:37:38 -08:00
ford.hoon ford: clear caches in response to memory pressure 2019-10-01 11:35:08 -07:00
iris.hoon arvo: wires up %trim memory-pressure event stubs 2019-09-27 13:02:11 -07:00
jael.hoon eyre: subscribe to apps for responses 2019-11-12 23:37:38 -08:00
mall.hoon eyre: subscribe to apps for responses 2019-11-12 23:37:38 -08:00
xmas.hoon Replace (fall (~(get by calls with (~(gut by 2019-06-30 18:13:34 +02:00