juli pushed a commit to branch wip-goblinsify in repository shepherd. commit 531176a4f6532e1b07ebcf3f89beb35af37556a0 Author: Juliana Sims <j...@incana.org> AuthorDate: Thu Oct 10 09:19:21 2024 -0400
scratch: Cleanup comments somewhat. --- scratch.scm | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/scratch.scm b/scratch.scm index 2cbbe74..d80846b 100644 --- a/scratch.scm +++ b/scratch.scm @@ -31,7 +31,7 @@ it" (bcom (^pcell bcom new-val) new-val)])) (define-syntax define-pcell - ;; Define a Cell using standard Scheme define syntax. + ;; Define a PropagatedCell using standard Scheme define syntax. (syntax-rules () [(_ id) (define id @@ -219,9 +219,8 @@ Log abnormal termination reported by @var{status}." ;; We don't want users to have to be aware of and use vats or actormaps when ;; writing Shepherd configs, and we also want them to be able to use the same -;; API they've been using. This format allows us to produce a thunk for spawning -;; services as part of register-services so users don't have to worry about -;; implementation details. +;; API they've been using. This format allows us to spawn services as part of +;; register-services so users don't have to worry about implementation details. (define* (service provision #:key (requirement '()) @@ -292,7 +291,7 @@ denoting what the service provides." ;; replacement for this service if there is one, else #f (define replacement (spawn ^cell)) ;; logger for this service if there is one, else #f - ;; TODO implement as actor; for now just a list + ;; TODO implement as actor; for now just a list. ;; may be best to have this proxy service actor ;; (unless we use Aurie for log?) (define logger (spawn ^cell '())) @@ -307,8 +306,6 @@ denoting what the service provides." ((respawn?) respawn?) ((respawn-limit) respawn-limit) ((respawn-limit-hit?) - "Return true of RESPAWNS, the list of times at which a given service was -respawned, shows that it has been respawned more than TIMES in SECONDS." (define now (current-time)) (define seconds (cdr respawn-limit)) @@ -461,6 +458,8 @@ respawned, shows that it has been respawned more than TIMES in SECONDS." ;; QUESTION: how do we handle the case of multiple active services providing ;; the same thing, eg database? How does a dependent know it's depending on ;; database-x instead of database-y if we have both in a network of machines? + ;; RESPONSE: Jessica mentioned the idea of having sturdyrefs + petnames for + ;; remote services. This could work. ((required-by? dependent) (on (<- dependent 'requirement) (lambda (dependent-requirement)