3 ms·
but..the "provide all the necessary abstractions to create an isolated context" is the hard part. It trickles into every part of execution. How do you do isolat
by rozap 6y ago
but..the "provide all the necessary abstractions to create an isolated context" is the hard part. It trickles into every part of execution. How do you do isolated contexts without saying any process can be preempted at any moment? How do you isolate things when there's shared memory? To do this right you end up with something like Erlang which makes a lot of sacrifices in order to get there, though you have a fighting chance at dealing with concurrency. And if you bolt it on to the runtime without those pieces in place you end up with something like Akka which has tons of gotchas and ends up being way more confusing than just programming the way the JVM wants you to.
it seems like these fundamentals are in tension, and tradeoffs need to be made, which just means that there won't be a one size fits all paradigm. maybe someone will create something that is truly magic and does everything, but more likely they're trying to sell you something.
- slavapestov 6y agoThere are also the various static checks that prevent you from accessing actor-isolated state outside the actor, or passing non-Sendable state across actor boundaries. It's not clear how a general language extension mechanism could implement those.
- nine_k 6y agoI wonder if Rust can do that, by using data lifetimes incompatible between actors, thus protecting them from being passed around beside sending. I also don't see why a namespace, like that of a function, won't be enough isolation from peeking between actors. Somehow Scala got Akka, the actor framework, without having to tailor the language for that.
- infogulch 6y agoIt seems like the problems of memory ownership and the first simple solution to it -- borrowing -- are fundamental to computing architecture.
- zamalek 6y ago> How do you isolate things when there's shared memory? That's precisely what actors aim to solve. Actors pass messages, not memory. > Akka If you look at an actor framework built in a feature-rich language (Orleans), that problem isn't apparent at all. Even Rust, with all the ownership complexity, manages to do elegantly handle actors, without an explicit plan to do so. Your critique is more relevant to Java than actor libraries.