3 ms·
Isn’t akka basically a Javafied version of OTP?
by ed25519FUUU 3y ago
Isn’t akka basically a Javafied version of OTP?
- cmrdporcupine 3y agoThe Joe Armstrong blog post linked by another commenter above actually addresses some of this: https://joearms.github.io/#2013-05-31%20A%20week%20with%20Elixir https://joearms.github.io/#2013-05-31%20A%20week%20with%20El... TLDR: GC and runtime behaviour generally are built from the ground up in OTP with this kind of concurrency and programming model in mind. Its advantages can be approximated but not fully replicated in "general purpose" runtimes like the JVM. Consider that the JVM model is for long-running shared memory systems. So its GC in particular is built around that model. Erlang/OTP as I understand is a lot of short lived processes that communicate through messages, sharing little state. Designing a GC for a system like that has entirely different trade-offs. Isolated short lived actors can throw-away their entire memory state at process end, without waiting for a generational collector to discard the garbage, etc. And that's just the GC. In general in a system bolting "actors" onto another shared memory language it's always going to be possible to "escape" that framework and do things in another paradigm. That might be fine for the real world, but it negates some of the advantages that OTP brings to the table.
- sph 3y ago"It didn't take long, but pretty soon my gut feeling kicked in. This is good shit." — Joe Armstrong, on Elixir (2013)
- bmitc 3y agoI recommend the talk The Soul of Erlang and Elixir by Sasa Juric. https://youtu.be/JvBT4XBdoUE https://youtu.be/JvBT4XBdoUE The thing that Erlang and Elixir have different is the BEAM VM and its support of concurrent processes at the VM level. So there are some things that they can do that Akka can't. For example, the scheduler is preemptive and keeps processes alive even though there may be rogue processes pegging the CPU.
- nvarsj 3y agoYeah kinda. Akka is an excellent option if you’re in the JVM ecosystem. I find it’s encumbered by a lot of complexity and cost though - which kinda comes with Scala and the JVM. It’s also a kitchen sink that tries to be everything for everyone - Akka was positioned to be the Spring of Scala, after all. Whereas Erlang/OTP is a very pragmatic, simple language and runtime geared solely towards building distributed services. The gen_* behaviours are awesome and I’ve never seen anything like it (at least in terms of simplicity and practicality) in other languages or runtimes.