Live data from Hacker News

Swift Distributed Actors

swift.org

81–90 of 135 posts

Re: Swift Distributed Actors

#81
post #55

Earlier quoted context omitted.

Absolutely. I was watching Alan Kay's "Inventing the Future" talks recorded a few years ago, and this was a thing he referred to in passing. In recent month's, every time I run across the whole "OO is evil/dead/horrible" meme (esp. common here) it turns out to be someone talking whose experience of "OO programming" is limited to C++/Java and their relatives. If your only exposure to OO was those (and similar) languag…

You are describing Erlang and it can not get simpler than that.

not really, smalltalk's "actors"[0]/objects are organized around data encapsulation principles. Erlang's "actors"[0]/processes are organized around failure domain principles. It's not unreasonable to go in one direction (making your data encapsulation match failure domains) but if you try to organize Erlang's "actors" around data encapsulation you will wind up with very shitty code (hard to read, hard to test, hard to debug, unnecessary performance regressions), unsurprisingly, because that is not what they were meant to be.

[0] I put actors in quotes because neither are true actor system, either. Nor were either designed to be, though if you squint they look similar.

Re: Swift Distributed Actors

#82
post #80

So Swift is pretty much dead in the backend space and somehow they're pushing actors in the language? I just don't understand the vision.

Why do you think it is dead? I have always thought that it is incomplete as a language, just give it time. Swift seems to be my cup of tea after years of Java and Typescript. I would really like to learn about these new features and apply them in a backend scenario. Julia is another language that did not catch up as people expected (especially the data science community) but I enjoy using it for my personal projects, that does not mean it is dead.

Re: Swift Distributed Actors

#83
post #28

What's the TLDR on why this is a language feature vs a library?

Anything concurrent and distributed you want supported by your runtime a la Erlang. The reason is: you want certain guarantees. For example, in Erlang you can set up a monitor on a process, and when that process exits for any reason , you get a notification, {EXIT, Reason}. Even if that reason was a catastrophic failure of some sort. If this is implemented as a library, then the runtime can kill your code at any time…

I don't know if that's true. In the Scala and Java worlds, a library called Akka provides distributed actors as a library. As far as I know, what you describe isn't a limitation. See https://doc.akka.io/docs/akka/2.5.32/general/supervision.htm...

Re: Swift Distributed Actors

#84

This is awesome, I'm always looking for more competition in the distributed actor model/system space. So now we'll have Akka, Elixir, Erlang and Swift as options. Pretty exciting! edit: Rust's Actix too! edit2: jk Actix is only local.

I’m the pessimistic opposite here; I’m a little shocked to see this largely failed idea be dragged back out of the history books again, a good decade-plus after the last major failed attempt.

We’ve gone through this so many times, and — outside the very specialized Erlang — the result is always the same. It doesn’t work.

OO Actors are a terrible concurrency model, and an even worse networking, protocol definition, and serialization model.

Re: Swift Distributed Actors

#85

This is awesome, I'm always looking for more competition in the distributed actor model/system space. So now we'll have Akka, Elixir, Erlang and Swift as options. Pretty exciting! edit: Rust's Actix too! edit2: jk Actix is only local.

Though it's nice to have so many choices, devs that really want actors will pick a battle-tested platform like Erlang+OTP in the 99% of cases. Because of the natue of BeamVM, which also got a JIT upgrade recently.

Re: Swift Distributed Actors

#86

This is awesome, I'm always looking for more competition in the distributed actor model/system space. So now we'll have Akka, Elixir, Erlang and Swift as options. Pretty exciting! edit: Rust's Actix too! edit2: jk Actix is only local.

I’m the pessimistic opposite here; I’m a little shocked to see this largely failed idea be dragged back out of the history books again , a good decade-plus after the last major failed attempt. We’ve gone through this so many times, and — outside the very specialized Erlang — the result is always the same. It doesn’t work. OO Actors are a terrible concurrency model, and an even worse networking, protocol definition, a…

Erlang nailed the actor model.

Re: Swift Distributed Actors

#87

This is awesome, I'm always looking for more competition in the distributed actor model/system space. So now we'll have Akka, Elixir, Erlang and Swift as options. Pretty exciting! edit: Rust's Actix too! edit2: jk Actix is only local.

I’m the pessimistic opposite here; I’m a little shocked to see this largely failed idea be dragged back out of the history books again , a good decade-plus after the last major failed attempt. We’ve gone through this so many times, and — outside the very specialized Erlang — the result is always the same. It doesn’t work. OO Actors are a terrible concurrency model, and an even worse networking, protocol definition, a…

I've used Akka extensively and beg to differ. It's such a clean departure from traditional concurrent programming and the "let it fail" mentality around it is real.

The distributed features work as intended to great effect with only certain edge cases (split brain for example) that need to have care but at that point in scale, you're already leveraging all the best parts.

Re: Swift Distributed Actors

#88

This is awesome, I'm always looking for more competition in the distributed actor model/system space. So now we'll have Akka, Elixir, Erlang and Swift as options. Pretty exciting! edit: Rust's Actix too! edit2: jk Actix is only local.

is Actix distributed?

Actually no, I misspoke. Looks like they're just local.

Re: Swift Distributed Actors

#89

This is awesome, I'm always looking for more competition in the distributed actor model/system space. So now we'll have Akka, Elixir, Erlang and Swift as options. Pretty exciting! edit: Rust's Actix too! edit2: jk Actix is only local.

Seift Actors is created by the Akka creator, he's been at Apple for a while now

Re: Swift Distributed Actors

#90
post #89

This is awesome, I'm always looking for more competition in the distributed actor model/system space. So now we'll have Akka, Elixir, Erlang and Swift as options. Pretty exciting! edit: Rust's Actix too! edit2: jk Actix is only local.

Seift Actors is created by the Akka creator, he's been at Apple for a while now

Yep, they (ktoso) are the author of this article. I think they were just a lead dev though, not sure if they actually created Akka.
Post reply on HN