unofficial mirror of guix-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: "Ludovic Courtès" <ludo@gnu.org>
To: Christopher Baines <mail@cbaines.net>
Cc: guix-devel@gnu.org
Subject: Re: Implementing the guix-dameon in Guile
Date: Thu, 14 Sep 2023 18:36:07 +0200	[thread overview]
Message-ID: <87sf7g7lvs.fsf@gnu.org> (raw)
In-Reply-To: <87o7i4sprt.fsf@cbaines.net> (Christopher Baines's message of "Thu, 14 Sep 2023 16:53:16 +0100")

Christopher Baines <mail@cbaines.net> skribis:

> I'm not very familiar with actors, but I guess that's similar to having
> a bunch of cooperating fibers which handle different things.

Yes.  Specifically, actors here are a fiber together with a channel;
each actor looks like:

  (let loop ((state …))
    (match (get-message channel)
      ;; handle request and call ‘loop’
      ))

The actor keeps serving requests it gets on its channel.

It makes quite a difference when you start framing it this way.  When I
first fiberized Cuirass years ago, I’d just use ‘spawn-fiber’ here and
there where concurrency was needed.  Thinking in terms of actors makes
the code clearer, allows you to think about “concurrency units”, respect
separation of concerns, and so on.  (Our Spritely comrades would explain
this much better!)

Ludo’.


  reply	other threads:[~2023-09-14 16:36 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-09-13 15:36 Implementing the guix-dameon in Guile Christopher Baines
2023-09-13 16:44 ` Felix Lechner via Development of GNU Guix and the GNU System distribution.
2023-09-13 17:13   ` Maxim Cournoyer
2023-09-14  7:12     ` Simon Tournier
2023-09-14  8:22     ` Christopher Baines
2023-09-13 18:56 ` Vagrant Cascadian
2023-09-14  8:42   ` Christopher Baines
2023-09-14 15:35     ` Ludovic Courtès
2023-09-14 12:58 ` Josselin Poiret
2023-09-18 12:57   ` Christopher Baines
2023-09-14 13:29 ` Ludovic Courtès
2023-09-14 15:53   ` Christopher Baines
2023-09-14 16:36     ` Ludovic Courtès [this message]
2023-09-16  9:41   ` Mathieu Othacehe
2023-09-18 13:19     ` Christopher Baines
2023-09-18 19:12   ` Thompson, David
2023-09-14 17:31 ` Caleb Ristvedt via Development of GNU Guix and the GNU System distribution.
2023-09-18 12:58   ` Christopher Baines
2023-09-14 22:46 ` Mekeor Melire
2023-09-18 13:15   ` Christopher Baines
  -- strict thread matches above, loose matches on Subject: below --
2023-12-30 12:57 Yarl via Development of GNU Guix and the GNU System distribution.

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://guix.gnu.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87sf7g7lvs.fsf@gnu.org \
    --to=ludo@gnu.org \
    --cc=guix-devel@gnu.org \
    --cc=mail@cbaines.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).