guile-user
[Top][All Lists]
Advanced

[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:

  
http://git.savannah.gnu.org/cgit/8sync.git/commit/?id=61fed4138184d12cfcdca93035492119999dfa48

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!)


[Fibers] https://github.com/wingo/fibers/

[actor model] https://en.wikipedia.org/wiki/Actor_model

[Communicating Sequential Processes (CSP)] http://usingcsp.com/

[process calculi] https://en.wikipedia.org/wiki/Process_calculus

[relationship between the actor model and process calculi]
https://en.wikipedia.org/wiki/Actor_model_and_process_calculi

[relationship between CSP and the actor model]
https://en.wikipedia.org/wiki/Communicating_sequential_processes#Comparison_with_the_Actor_Model

[dual] https://en.wikipedia.org/wiki/Dual_%28mathematics%29



reply via email to

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