Links

Concurrency Comparison: Go v/s Elixir

Posted on 30 Jan, 2023

Goroutines = CSP Process​

  • One goroutine only knows about channels, its not aware about other goroutines.
  • There are anonymous
  • Message passing is synchronous.
  • Go routines are managed by Go runtime.
  • Avg size in order on 2KB.

Example

go someFunction()

Elixir Process = Actor Model​

  • Processes communicate directly to each other
  • Elixir process has an id (non-anonymous).
  • Managed by BEAM Virtual Machine.
  • Separate stack & heap.
  • Average size of 0.5KB.

Example

spawn(fn -> ... end)

Resources