Garbage Collection in Erlang vs JVM/Akka with Manuel Rubio & Dan Plyukhin

About this Episode

Published November 30, 2023 | Duration: 44:08 | RSS Feed | Direct download
Transcript: English

Today on Elixir Wizards, Manuel Rubio, author of Erlang/OTP: A Concurrent World and Dan Plyukhin, creator of the UIGC Actor Garbage Collector for Akka, join host Dan Ivovich to compare notes on garbage collection in actor models.

The discussion digs into the similarities and differences of actor-based garbage collection in Erlang and Akka and introduces Dan's research on how to perform garbage collection in a distributed actor system.

Topics discussed:

  • Akka is akin to Erlang actors for the JVM using Scala, with similar principles like supervision trees, messages, and clustering
  • Erlang uses generational garbage collection and periodically copies live data to the old heap for long-lived elements
  • Actor GC aims to determine when an actor's memory can be reclaimed automatically rather than manually killing actors
  • Distributed actor GC is more challenging than object GC due to the distributed nature and relationships between actors across nodes
  • Challenges include reasoning about failures like dropped messages and crashed nodes
  • GC balance requires optimization of resource release and CPU load management
  • Immutability helps Erlang GC, but copying data for messages impacts performance
  • Research into distributed actor GC is still ongoing, with opportunities for improvement
  • Fault tolerance in Erlang relies on user implementation rather than low-level guarantees
  • Asynchronous messages in Erlang/Elixir mean references may become invalid which is similar to the distributed GC approaches in Dan's research
  • Idempotent messaging is recommended to handle possible duplicates from failures
  • Help your local researcher! Researchers encourage communication from practitioners on challenges and use cases

Links mentioned:

Erlang/OTP Volume 1: A Concurrent World by Manuel Rubio 
Akka Framework 
JVM (Java Virtual Machine) 
Hadoop Framework  
Pony Programming Language 
SLSA Programming Language
Paxos Algorithm 
Raft library for maintaining a replicated state machine 
Dan's Website 
Dan Plyukhin on Twitter: 
Dan Plyukhin’s YouTube channel:
UIGC on GitHub 
Manuel's Website 
Manuel Rubio on Twitter:

Special Guests: Dan Plyukhin and Manuel Rubio.

Transcript (English):