Upgrade to Pro — share decks privately, control downloads, hide ads and more …

A brief introduction to Elixir/Erlang VM

A brief introduction to Elixir/Erlang VM

This is the presentation given at the fifth elephant 2015 at Bangalore. Due to time limit restrictions, the presentation is introductory and basic.

Link https://www.youtube.com/watch?v=u-xI4jOfng4

abhijitiitr

July 23, 2015
Tweet

Other Decks in Education

Transcript

  1. Brief overview of Erlang VM • Achieves scalability through actor

    model paradigm • Provides solid mechanisms for fault tolerance • Purely preemptive multithreading(SMP) support • Built in support for distribution(remote nodes are transparent) • Elixir which has Ruby inspired syntax can exploit the features of Erlang VM http://elixir-lang.org/
  2. Usage context for us • Replacing core Ruby services posing

    bottlenecks in our architecture to Elixir • Introducing custom logic support in RabbitMQ(our main messaging queue) • Introducing elixir lang views support for CouchDB
  3. Experiences of using Elixir in production • Generic code is

    easy and fast to implement (nearly same speed as Ruby) • Build system is comfortable too ( mix and exrm) • Test cases are easy and practical to implement • Thinking functional is a bit problematic at times ( Objects v immutable data) • Library support is slowly maturing( We had to write a few hacks around some of the client libraries)
  4. Some catches in Erlang VM • Tail recursive functions •

    Large binaries in Erlang VM are reference counted • Old generations trigger stop the world GC killing the soft-realtime behavior of the VM • Some of our messages were quite long (Large polygons, Images) • Try to compress them through encoding and test if the memory spikes when the VM is subjected to load • Handle distribution with care( code for error handling is a must)