Commit Graph

65 Commits

Author SHA1 Message Date
Pyry Kovanen
ac9c779e2d
spider: uncomment spurious comment line 2023-05-08 19:08:12 +03:00
yosoyubik
7f7c1cb6aa spider: fix extraneous debugging code 2023-04-27 13:59:35 +02:00
yosoyubik
cfc1a58559 spider: fix tracking remote-scry requests
Prevously we were tracking remote scry requests using a map, assuming
that every thread would do just one remote scry request. This is not
right. A thread that did multiple +keen:strandio was treated as
if just the last call existed, overwritten previous entries in the map.

Now we track remote scries using a jug that accounts for multiple %keen
tasks per thread.

The logic for sending %yawns to %ames has been updated for the following
scenarios:

- +thread-fail will always send a %yawn task
- +thread-done doesn't send %yawn tasks
  - unless a running thread is stopped
- if %spider is reloaded:
  - %yawn tasks will be sent for any running or starting thread

/lib/strandio also removes +take-tune from +keen,  decoupling
sending %tasks and receiving %signs. This allows for clients
to request multiple paths at future cases, without blocking.
2023-04-27 13:55:06 +02:00
yosoyubik
873de61269 ames: give %miss to all listeners on %keen cancel
%spider will send a %yawn task to ames if a thread fails
or stops. if the thread is done, it will delete the scry
from its state without notifying %ames
2023-04-19 11:03:11 +02:00
Joe Bryan
c864f95598 ames: drop %pine 2023-04-18 10:25:45 -04:00
yosoyubik
2691d02d28 spider: check thread cards to track remote scries 2023-04-04 14:44:36 +02:00
yosoyubik
920c208a60 ames: fix on-pine 2023-04-03 12:48:16 +02:00
yosoyubik
dbac58827e spider: clean up remote scries on thread-done 2023-04-03 09:40:56 +02:00
yosoyubik
6c06fa16fa spider: support tracking/canceling scry requests
(%spider only tracks scry requests started by the -keen thread)
2023-04-03 09:18:51 +02:00
Philip Monk
ebf09bd248 clay: defer all calls to %wick 2022-10-26 22:09:53 -07:00
Philip Monk
e3a8cab943 khan: support inline threads
This allows you to pass a thread directly into khan, instead of passing
a filename.  This has several implications:

- The friction for using threads from an app is significantly lower.
  Consider:

    =/  shed
      =/  m  (strand ,vase)
      ;<  ~  bind:m  (poke:strandio [our %hood] %helm-hi !>('hi'))
      ;<  ~  bind:m  (poke:strandio [our %hood] %helm-hi !>('there'))
      (pure:m !>('product'))
    [%pass /wire %arvo %k %lard %base shed]

- These threads close over their subject, so you don't need to parse
  arguments out from a vase -- you can just refer to them.  The produced
  value must still be a vase.

    ++  hi-ship
      |=  [=ship msg1=@t msg2=@t]
      =/  shed
        =/  m  (strand ,vase)
        ;<  ~  bind:m  (poke:strandio [ship %hood] %helm-hi !>(msg1))
        ;<  ~  bind:m  (poke:strandio [ship %hood] %helm-hi !>(msg2))
        (pure:m !>('product'))
      [%pass /wire %arvo %k %lard %base shed]

- Inline threads can be added to the dojo, though this PR does not add
  any sugar for this.

    =strandio -build-file %/lib/strandio/hoon
    =sh |=  message=@t
        =/  m  (strand:rand ,vase)
        ;<  ~  bind:m  (poke:strandio [our %hood] %helm-hi !>('hi'))
        ;<  ~  bind:m  (poke:strandio [our %hood] %helm-hi !>(message))
        (pure:m !>('product'))
    |pass [%k %lard %base (sh 'the message')]

Implementation notes:
- Review the commits separately: the first is small and implements the
  real feature.  The second moves the strand types into lull so khan can
  refer to them.

- In lull, I wanted to put +rand inside +khan, but this fails to that
  issue that puts the compiler in a loop.  +rand depends on +gall, which
  depends on +sign-arvo, which depends on +khan.  If +rand is in +khan,
  this spins the compiler.  The usual solution is to either move
  everything into the same battery (very ugly here) or break the
  recursion (which we do here).
2022-08-29 21:04:50 -08:00
Philip Monk
0e14eedb50 spider: accept inline threads 2022-08-29 20:09:08 -08:00
Philip Monk
591bdf458c Merge branch 'next/arvo' into philip/tomb 2022-05-04 00:45:57 -07:00
Philip Monk
ac6e793aa2 arvo: rename +de to +of 2022-04-22 17:55:42 -07:00
fang
4415aa781e
Merge branch 'next/arvo' into m/aqua-revival 2022-04-20 18:47:59 +02:00
Philip Monk
4131821b4f clay: unify all trie implementations
We had trie operations independently implemented in +de in arvo,
+an:cloy in zuse, +zu in clay, lib/trie, and app/spider.  This unifies
them all into +de in arvo, aggregating the used operations.
2022-04-06 00:19:38 -07:00
drbeefsupreme
656a86479f
spider: fix child threads
addresses #5442 by adding %thread-done and %thread-fail marks. also
fixes await-thread:strandio and removes some blank lines from
app/spider.hoon

%thread-done loses the type of the result, so you'll need to use ;; to
get it back. the real way to fix this is to have threads produce cages
instead of vases
2022-03-25 18:01:48 -04:00
fang
250e750a89
spider: factor spider-arg type out into interface
And fix a callsite that wasn't conforming.
2022-03-16 21:10:31 +01:00
Jōshin
4c22e2ceaa
spider: blank lines 2022-01-31 15:47:14 -06:00
Liam Fitzgerald
9ee819e5ac spider: do not glob http request serving in +handle-start-thread 2021-09-29 09:57:23 +10:00
ryjm
ed5e7e84ce spider: remove noisy logs
we weren't logging these anyway
2021-09-27 22:17:43 -04:00
ryjm
bf534ffe71 spider: clean serving threads 2021-09-27 22:09:35 -04:00
ryjm
472f16fd2e garden spider: address comments 2021-09-27 21:23:46 -04:00
ryjm
098587bf8b spider: fix mark validation
glob is succesfully downloaded and inserted into the docket state, but
as an octet stream. need to define the correct marks.
2021-09-27 21:23:46 -04:00
ryjm
121a7c9468 garden spider: add desk tracking 2021-09-27 21:23:46 -04:00
ryjm
ddf9e769ae spider, docket: move back to threads 2021-09-27 21:23:46 -04:00
ryjm
a08c38b83c spider: track desks and validate marks (wip) 2021-09-27 21:23:46 -04:00
Hunter Miller
c7cafd8e1a permalink: fixed path and spider case 2021-09-20 21:09:19 -05:00
Liam Fitzgerald
143a8e08e6 various: fix dependencies & tests 2021-09-17 14:51:19 +10:00
Liam Fitzgerald
f95a182071 spider: store desk for http response 2021-09-13 21:01:42 +10:00
Ted Blackman
6d7d168735 Revert "Merge branch 'dist' of github.com:urbit/urbit into dist"
This reverts commit f50f2cd1f3, reversing
changes made to 248b968550.
2021-09-06 21:13:07 +03:00
Liam Fitzgerald
5bcc0e98c8 spider: store desk for http response 2021-09-02 10:44:49 +10:00
Liam Fitzgerald
b60aada75e spider: parameterize desk in http request 2021-08-26 12:13:15 +10:00
Ted Blackman
442fa7617b spider: hack to make landscape http threads work 2021-07-21 11:56:03 +03:00
Ted Blackman
cee258c9b6 spider: threads on other desks, and fixed call sites 2021-07-19 15:17:55 +03:00
Ted Blackman
4cb5cd0ba1 gall,drum,kiln: WIP start agents in kiln 2021-07-15 09:51:03 +03:00
Logan Allen
f256470a4c spider: add profiling hints so we can see how slow it is 2021-06-14 16:16:10 -05:00
fang
6769e5cf5a
spider: prefix thread ids with thread name
For thread ids generated by spider itself, includes the name of the thread,
for convenient identification.
2021-01-06 22:20:51 +01:00
Philip Monk
598a46d1f7
Merge remote-tracking branch 'origin/la/spider-fix' into philip/gall-vega 2020-12-18 17:04:02 -08:00
Logan Allen
fe728fea35 observe-hook: add %group-on-leave back to observers 2020-12-10 13:55:14 -06:00
Logan Allen
fbfe5f46f0 spider: verbose 2020-12-10 13:46:42 -06:00
Joe Bryan
17736990ed arvo: full vane names in $sign 2020-12-07 16:30:22 -08:00
fang
03fd56e8cc
various: start threads with unit of tuple args
Instead of a list of arguments, with trailing ~.
2020-12-01 23:38:02 +01:00
Logan Allen
cfbfa59100 spider: make handle-stop-thread into a get by instead of a got by to fix failing +on-load 2020-11-20 16:22:49 -06:00
Logan Allen
79ac6eb8cd Merge branch 'release/next-userspace' into lf/graph-publish-fe 2020-10-20 15:08:40 -05:00
Logan Allen
c9cb97d476 spider: update http handler to be compatible with dojo 2020-10-16 10:42:06 -05:00
Liam Fitzgerald
4551e16976 Merge branch 'release/next-userspace' into lf/graph-publish-fe 2020-10-13 14:51:14 +10:00
Liam Fitzgerald
ef7bb37f8f Merge branch 'release/next-userspace' into lf/graph-publish-fe 2020-10-01 09:43:34 +10:00
Logan Allen
36f53a434d spider: bind eyre unconditionally upon upgrade 2020-09-25 16:28:17 -05:00
Liam Fitzgerald
9ef2adf9da graph-view: error-handling pass 2020-09-11 13:09:34 +10:00