juli pushed a commit to branch wip-goblinsify in repository shepherd. commit 5358fcfa73dc36f54850039ed26790abb037c350 Author: Juliana Sims <j...@incana.org> AuthorDate: Thu Oct 24 10:57:52 2024 -0400
Incorporate more feedback into design doc --- goblins-port-design-doc.org | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/goblins-port-design-doc.org b/goblins-port-design-doc.org index 5c7327b..98cfed7 100644 --- a/goblins-port-design-doc.org +++ b/goblins-port-design-doc.org @@ -70,7 +70,8 @@ back and forth, sometimes in messages sent over channels. Importantly, the Shepherd does not enable parallelism in its core fiber. Fibers builds parallelism on top of POSIX threads, which are incompatible with the ~fork~ syscall. Because the Shepherd is charged with spawning and -monitoring processes, it needs to be able to safely call ~fork~. +monitoring processes, it needs to be able to safely call ~fork~, and thus it +uses Fibers in single-threaded mode. *** Rewrite Goals @@ -78,7 +79,7 @@ Goblins manages most concurrency complexity for library users. The primary abstraction exposed to users is the vat. The Goblins Shepherd will use a relatively small number of vats and spawn specific actors in different vats to avoid deadlocks. In particular, the vats we foresee needing are for the main -Shepherd dæmon REPL, for the service registry, for the process monitor, and +Shepherd actor, for the service registry, for the process monitor, and possibly for ~herd~ instances. It's worth noting that Guile Goblins does not currently support automatically @@ -87,8 +88,9 @@ reclaim the resources used by a vat, we need to stop it ourselves. However, with the exception of the possible ~herd~ vats, vats will likely run for the lifetime of the dæmon itself and so not need to be stopped and collected in program code. In the case of ~herd~ vats, execution of a given command will -be synchronous which should allow traditional ~dynamic-wind~ to handle -cleanup. +be synchronous which should allow traditional ~dynamic-wind~ to handle cleanup +if necessary, and otherwise the kernel will collect the process's resources +after execution. Goblins does not disable parallelism in its default scheduler so it may be necessary to write a custom scheduler for the Shepherd's main process.