Lock in $30 Savings on PRO—Offer Ends Soon! ⏳
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
Solid Ground
Search
Saša Jurić
May 20, 2017
Programming
15
1.2k
Solid Ground
Empex, 2017
Saša Jurić
May 20, 2017
Tweet
Share
More Decks by Saša Jurić
See All by Saša Jurić
Such Great Heights, Code BEAM Lite, Amsterdam 2018
sasajuric
0
180
Simplifying systems with Elixir - Belgrade
sasajuric
3
460
Simplifying systems with Elixir
sasajuric
2
580
Metagrokking Elixir
sasajuric
4
300
Solid Ground
sasajuric
3
890
Elixir - valentine edition
sasajuric
0
140
What's the fuss about Phoenix?
sasajuric
2
1.1k
Phoenix
sasajuric
1
240
Phoenix
sasajuric
0
120
Other Decks in Programming
See All in Programming
從冷知識到漏洞,你不懂的 Web,駭客懂 - Huli @ WebConf Taiwan 2025
aszx87410
2
2.7k
AIエージェントを活かすPM術 AI駆動開発の現場から
gyuta
0
430
TUIライブラリつくってみた / i-just-make-TUI-library
kazto
1
390
令和最新版Android Studioで化石デバイス向けアプリを作る
arkw
0
410
これだけで丸わかり!LangChain v1.0 アップデートまとめ
os1ma
6
1.9k
Rubyで鍛える仕組み化プロヂュース力
muryoimpl
0
140
愛される翻訳の秘訣
kishikawakatsumi
3
330
AtCoder Conference 2025「LLM時代のAHC」
imjk
2
510
Socio-Technical Evolution: Growing an Architecture and Its Organization for Fast Flow
cer
PRO
0
360
WebRTC、 綺麗に見るか滑らかに見るか
sublimer
1
190
AI時代を生き抜く 新卒エンジニアの生きる道
coconala_engineer
1
270
AWS CDKの推しポイントN選
akihisaikeda
1
240
Featured
See All Featured
The Straight Up "How To Draw Better" Workshop
denniskardys
239
140k
The Success of Rails: Ensuring Growth for the Next 100 Years
eileencodes
47
7.9k
StorybookのUI Testing Handbookを読んだ
zakiyama
31
6.5k
Being A Developer After 40
akosma
91
590k
Measuring & Analyzing Core Web Vitals
bluesmoon
9
710
Automating Front-end Workflow
addyosmani
1371
200k
Optimizing for Happiness
mojombo
379
70k
Docker and Python
trallard
47
3.7k
CSS Pre-Processors: Stylus, Less & Sass
bermonpainter
359
30k
GraphQLとの向き合い方2022年版
quramy
50
14k
Understanding Cognitive Biases in Performance Measurement
bluesmoon
32
2.7k
Scaling GitHub
holman
464
140k
Transcript
Solid ground @sasajuric aircloak.com
pattern matching OTP metaprogramming mix Distillery the pipe operator Cowboy
Plug Phoenix Ecto functional programming community GenStage Credo ExUnit Combine Poolboy Nerves
None
LFE Erlang OTP BEAM Elixir Phoenix GenStage Ecto Plug magic
source magic beneficiaries Cowboy Poolboy
long-running system many tasks soft real-time finite time program all-or-nothing
hard real-time
scheduler scheduler scheduler scheduler BEAM CPU CPU CPU CPU
frequent context switches
t1 t2 t3 t4 t5 10 s 1 ms 1
ms 1 ms 1 ms
t1 BEAM scheduler t2 t3 t4 t5 t1
t1 cooperative scheduler t2 t3 t4 t5
thread 1 thread n long running task long running task
blocked cooperative scheduler …
thread 1 thread n long running task long running task
BEAM scheduler … not blocked :-)
activities as runtime citizens
send(pid, :please_stop)
mref = Process.monitor(pid) send(pid, :please_stop) receive do {:DOWN, ^mref, :process,
^pid, _reason} -> :ok end
mref = Process.monitor(pid) send(pid, :please_stop) receive do {:DOWN, ^mref, :process,
^pid, _reason} -> :ok after :timer.seconds(5) -> Process.exit(pid, :kill) receive do {:DOWN, ^mref, :process, ^pid, _reason} -> :ok end end
task = Task.async(fn -> ... end) case Task.yield(task, :timer.seconds(5)) do
{:ok, result} -> do_something(result) nil -> Task.shutdown(task, :brutal_kill) end
shared-nothing concurrency
Process heap resources
process-owned “stuff” is released
supervision tree
system backend frontend chat history repo cache endpoint
system backend chat history repo
supervisor foundations frequent context switching activities as runtime citizens observable
process termination stoppable processes shared-nothing concurrency
syntax developer friendliness ecosystem
runtime guarantees syntax developer friendliness ecosystem
Scales of Justice image taken from clipartfox.com How Erlang does
scheduling http://jlouisramblings.blogspot.hr/2013/01/how-erlang-does-scheduling.html Erlang scheduler details https://hamidreza-s.github.io/erlang/scheduling/real-time/preemptive/migration/ 2016/02/09/erlang-scheduler-details.html The BEAM book https://github.com/happi/theBeamBook BEAM wisdoms http://beam-wisdoms.clau.se/en/latest/ Web based observer https://github.com/shinyscorpion/wobserver Recon http://ferd.github.io/recon/ Erlang performance lab http://www.erlang.pl/