Fork me on GitHub
#off-topic
<
2018-06-23
>
borkdude09:06:10

damn, I’m happy I bought a MBP 15" 2015 days before the new one came out…

Denis G16:06:03

Guys, that’s so special about actor model? It’s just a function called on a queue, whereby the messages are inserted and popped synchronously. But since messages are executed sequentially, it’s not really concurrent. So what’s so cool about it? It’s like instead of acquiring the lock on the data you are working with, you acquire lock around the function which is called. Is it really SO SPECIAL?

Alex Miller (Clojure team)16:06:21

The cool thing about the actor model is supervision

tbaldridge16:06:22

A single actor is not concurrent, but many actors working together are. The "official" view of the actor is that you need 3 things: 1) A way to send a message to an actor 2) A way to create an actor from a running actor 3) A way to specify how the next message given to the actor should be processed

tbaldridge16:06:14

So at a really low level, that's it. What Erlang and Akka have done is extended that to supervision and the like, but at the core actors are another form of programming paradigm that has its own tradeoffs.

tbaldridge16:06:24

Message passing systems are becoming more and more important as we reach many core CPUs. The new Threadripper 2 from AMD is a rather horrific design for shared memory systems. As time goes on we'll probably see more issues in that area.

Denis G16:06:14

@alexmiller so supervision is something that actor has, but CSP doesn’t? Other that that, replace messagebox with channel and you get something really similar to CSP? Or not so simple, since channels are 1:1, message-boxes are 1:N?

tbaldridge16:06:01

They're really different. Actor systems don't guarantee delivery or even message ordering. CSP guarantees both.

Denis G16:06:28

it’s kinda TCP (CSP) vs UDP (Actor model), right?

tbaldridge16:06:55

But on the other hand it's pretty much impossible to extend a CSP channel over a network. And since it requires about 2-3 locks, performance will degrade the more cores are involved.

tbaldridge16:06:47

Somewhat like TCP, but it's even worse. since when you do (chan) you create a channel that's a handoff. Your write won't complete until the other end has taken the message. That's really hard (impossible I think) to do across a network

tbaldridge16:06:19

So yeah, actors are a bit more like UDP in that way, and then systems like Erlang and Akka add automatic retries, supervision, etc.

Denis G16:06:52

@tbaldridge but in TCP you also send ACK messages, to confirm the receiving of the message

tbaldridge16:06:07

(Hewitt invented the actor model)

Denis G16:06:18

I’ve started to watch that video, but it was kinda dry, or maybe I wasn’t really concentrated I’ve been watching this right now: https://www.youtube.com/watch?v=lPTqcecwkJg

Denis G16:06:25

Thanks for your help 😉 It always feels good to learn new concepts

tbaldridge16:06:18

BTW, something I do when I'm bored is go here: https://en.wikipedia.org/wiki/Programming_paradigm and pick a link from the right-hand side and start reading up on it. There's a lot more out there than FP/OOP

👍 16
justinlee17:06:43

when i get bored i usually go to youtube. maybe that’s why i suck 😛