--- title: Essential Erlang/OTP transition: fade --- {% from "deckjs.html" import section with context %} {% call section('--------------- First Page ----------------------') %} ## Essential Erlang/OTP ### Chicago Erlang - October 4, 2013 ### Garrett Smith @gar1t {% endcall %} {% call section('--------------- PLEX -------------------------') %} ## Ericsson, AXE and PLEX - 1980s {% endcall %} {% call section('--------------- PLEX -------------------------') %} ## PLEX - Safe pointers - Fine grained massive concurrency - Independent, isolated software "blocks" - Update code at runtime without stopping - Runtime tracing - Restart mechanisms (small and large) {% endcall %} {% call section('---------------- $10K Fine -------------------') %} ## Expectations
We would pay a $10,000 fine immediately if we were one second over 4 minutes.
Joe Armstrong on AXE SLAs
{% endcall %} {% call section('--------------- History ----------------------') %} ## History {% endcall %} {% call section('---------- History / Prolog -------------------') %} ## History {% endcall %} {% call section('------------ History / Global Data ------------') %} ## Early Design Decisions - **No global data** (from Prolog) - Each process has its own stack and heap - Very fast context switching - Nondisruptive garbage collection - Tried a global heap - blindingly fast, but - Complicates the implementation - Complicates garbage collection - Undermined stability of the system - "Wasn't worth the effort" {% endcall %} {% call section('------------- Message Passing ----------------') %} ## On Message Passing
The systems we were building are world wide distributed systems. Where's the shared memory when you've got one node in London and another in Paris and another in Stockholm. There is no shared memory!
Joe Armstrong
{% endcall %} {% call section('------------ History / Users ------------------') %} ## History {% endcall %} {% call section('--------- Misinterpreted the Problem ---------') %} ## On Understanding The Problem
We put a lot of stuff in there which weren't necessary -- we had misinterpreted the problem.
Robert Virding
{% endcall %} {% call section('------------ Used and Removed ----------------') %} ## On Features
Most of the things you'll find in the language today are actually being used. And things which aren't being used have been removed.
Robert Virding
{% endcall %} {% call section('------------ History / DSL --------------------') %} ## History {% endcall %} {% call section('--------- History / Std Language --------------') %} ## History {% endcall %} {% call section('--------- History / Java ----------------------') %} ## History {% endcall %} {% call section('--------------- OS For Your Code -------------') %} ## Erlang In 10 Words Or Less
Erlang is an operating system for your code.
Me
{% endcall %} {% call section('------------ Win31 ------------------------') %} ## Windows 3.1 Syndrome {% endcall %} {% call section('------------ Win31 Happy ------------------') %} ## Windows 3.1 - Happy State {% endcall %} {% call section('------------ Win31 Sad --------------------') %} ## Windows 3.1 - Sad State {% endcall %} {% call section('------------ Win31 Reboot -----------------') %} ## Windows 3.1 - Time to Reboot {% endcall %} {% call section('------------- Kernel Happy ----------------') %} ## Modern OS - Happy State {% endcall %} {% call section('------------- Kernel Happy 2 --------------') %} ## Modern OS - Also Happy State {% endcall %} {% call section('------------- Isolation -> Systems --------') %} ## Isolation => System {% endcall %} {% call section('------------- Failure ---------------------') %} ## Failure {% endcall %} {% call section('------------- Recovery --------------------') %} ## Recovery {% endcall %} {% call section('---------- Performance Implications ----------') %} # Performance Implications of
"OS For Your Code" {% endcall %} {% call section('---------- Manycore --------------------------') %} ## Concurrent Programming {% endcall %} {% call section('---------- Distributed -----------------------') %} ## Distributed Programming {% endcall %} {% call section('---------- Quality Implications --------------') %} # Quality Implications of
"OS For Your Code" {% endcall %} {% call section('---------- Safety ----------------------------') %} ## Safety {% endcall %} {% call section('---------- Fail Fast Code --------------------') %} ## Happy Path Coding (Fail Fast) :::erlang {ok, DB} = connect() % E.g. {error, Error} will crash!
:::erlang case result() of I when is_integer(I) -> float(I); F when is_float(F) -> F % any other value will crash! end {% endcall %} {% call section('----------- Design Implications --------------') %} # Design Implications of
"OS For Your Code" {% endcall %} {% call section('---------- Service Orientation ---------------') %} ## Service Orientation {% endcall %} {% call section('---------- Cell ------------------------------') %} ## Evolvability {% endcall %} {% call section('---------- Internet --------------------------') %} ## Evolvability {% endcall %} {% call section('------------ Google ---------------') %} ## Google's Math {% endcall %}