[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

The relationship between 8sync and Fibers, in (literal) theory!

From: Christopher Allan Webber
Subject: The relationship between 8sync and Fibers, in (literal) theory!
Date: Tue, 03 Jan 2017 11:59:01 -0600
User-agent: mu4e 0.9.16; emacs 25.1.1

Hello all!  Some of you have been following the growth of both 8sync and
Fibers, at least from some distance.  I'm happy to say that I've
unearthed some clarity on thei relationship.  I added a commit to the
8sync manual (or, what will become the new 8sync manual) to that effect:

Since that doesn't read nicely in the browser, here it is, exported to
a more vanilla plaintext friendly format.

                            8SYNC AND FIBERS

One other major library for asynchronous communication in Guile-land is
[Fibers].  There's a lot of overlap:

• Both use Guile's suspendable-ports facility
• Both communicate between asynchronous processes using message passing;
  you don't have to squint hard to see the relationship between Fibers'
  channels and 8sync's actor inboxes.

However, there are clearly differences too.  There's a one to one
relationship between 8sync actors and an actor inbox, whereas each
Fibers fiber may read from multiple channels, for example.

Luckily, it turns out there's a clear relationship, based on real,
actual theory!  8sync is based on the [actor model] whereas fibers
follows [Communicating Sequential Processes (CSP)], which is a form of
[process calculi].  And it turns out, the [relationship between the
actor model and process calculi] is well documented, and even more
precisely, the [relationship between CSP and the actor model] is well
understood too.

So, 8sync and Fibers do take somewhat different approaches, but both
have a solid theoretical backing… and their theories are well understood
in terms of each other.  Good news for theory nerds!

(Since the actors and CSP are [dual], maybe eventually 8sync will be
implemented on top of Fibers… that remains to be seen!)


[actor model]

[Communicating Sequential Processes (CSP)]

[process calculi]

[relationship between the actor model and process calculi]

[relationship between CSP and the actor model]


reply via email to

[Prev in Thread] Current Thread [Next in Thread]