[HN Gopher] CAF: C++ Actor Framework
       ___________________________________________________________________
        
       CAF: C++ Actor Framework
        
       Author : anarchyrucks
       Score  : 71 points
       Date   : 2020-03-01 16:32 UTC (6 hours ago)
        
 (HTM) web link (github.com)
 (TXT) w3m dump (github.com)
        
       | clarry wrote:
       | > Decoupling concurrently running software components via message
       | passing avoids race conditions by design.
       | 
       | How am I supposed to read this? It's obviously not "message
       | passing eliminates race conditions", so perhaps it's intended to
       | say something like "you need to design the components to avoid
       | race conditions."
        
         | dnautics wrote:
         | I don't think it's true. Message passing definitely doesn't
         | eliminate race conditions or deadlocks. Although, it's much
         | easier to design code that has fewer race conditions.
         | 
         | It's possible that they mean "it avoids data races by design".
        
           | jfkebwjsbx wrote:
           | Exactly! Data races are just a subset of issues!
        
           | senderista wrote:
           | Message passing without selective receive does eliminate
           | deadlocks. See: Pony.
        
       | Mofu-chan wrote:
       | I was bored so I added CAF to pkgsrc, which you can use to
       | install CAF on NetBSD/Linux/macOS and a variety of other Unix-ey
       | platforms that pkgsrc supports:
       | 
       | https://github.com/NetBSD/pkgsrc-wip/tree/master/actor-frame...
       | git clone https://github.com/NetBSD/pkgsrc --depth 1 ~/pkgsrc
       | git clone https://github.com/NetBSD/pkgsrc-wip --depth 1
       | ~/pkgsrc/wip           cd ~/pkgsrc/bootstrap
       | ./bootstrap --unprivileged           cd ~/pkgsrc/wip/actor-model
       | ~/pkg/bin/bmake install             ~/pkg/sbin/pkg_info -L actor-
       | model
       | 
       | That is all.
        
       | Koshkin wrote:
       | Honestly, the source code of the examples looks rather
       | complicated, like something that should better be generated from
       | a nicer high-level language that has a native actor concept.
       | (Obviously, the power of C++ templates does not come for free -
       | you pay with noisy code and increased cognitive load.)
        
         | ekez wrote:
         | Zeek uses CAF internally for data exchange over networks and
         | workers [1]. It's not quite a "native actor concept", but it is
         | a nice way to interact with the framework. I've used it before
         | and its worked quite smoothly.
         | 
         | [1] https://docs.zeek.org/en/current/frameworks/broker.html
        
         | jfkebwjsbx wrote:
         | And compilation times and memory requirements for it.
        
       | zoomablemind wrote:
       | In the Docs:Overview [0], the compile and build instructions are
       | not showing up for some reason.
       | 
       | [0] https://actor-
       | framework.readthedocs.io/en/latest/Overview.ht...
        
       | thedance wrote:
       | "Actor" architecture is supposed to enable high developer
       | productivity but it's been a decade since the article so I wonder
       | how it's working out? The most prominent project of which I am
       | aware is FoundationDB.
        
         | clarry wrote:
         | > it's been a decade since the article so I wonder how it's
         | working out?
         | 
         | What article? The actor model dates back to 70s much has been
         | written about its various implementations and incarnations
         | since then.
         | 
         | If you don't treat it like a theoretical model of computation
         | (like Hewitt does), then what's left is various largely
         | unrelated architectures that employ message passing, with
         | various levels of granularity.
         | 
         | I don't think any claim about higher developer productivity can
         | be made without specifying what it's being compared to.
        
         | staticassertion wrote:
         | The actor model is at least 50 years old if not more, and it is
         | found in all sorts of places in some form, which is
         | unsurprising since it is a fundamental model for computation.
         | So, for example, it is not hard to argue that SOA/Microservices
         | are implementations of an Actor approach to services.
        
           | thedance wrote:
           | Sure, sorry, I meant the actor model in C++ specifically,
           | according to the papers published by the authors of the
           | library that is in this post.
        
       | clarry wrote:
       | If someone's got a nice actor library written in and for C, I'm
       | all hears.
        
       ___________________________________________________________________
       (page generated 2020-03-01 23:00 UTC)