Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
Solid Ground
Search
Saša Jurić
May 20, 2017
Programming
1.3k
15
Share
Solid Ground
Empex, 2017
Saša Jurić
May 20, 2017
More Decks by Saša Jurić
See All by Saša Jurić
Such Great Heights, Code BEAM Lite, Amsterdam 2018
sasajuric
0
200
Simplifying systems with Elixir - Belgrade
sasajuric
3
480
Simplifying systems with Elixir
sasajuric
2
600
Metagrokking Elixir
sasajuric
4
320
Solid Ground
sasajuric
3
930
Elixir - valentine edition
sasajuric
0
150
What's the fuss about Phoenix?
sasajuric
2
1.1k
Phoenix
sasajuric
1
260
Phoenix
sasajuric
0
150
Other Decks in Programming
See All in Programming
Symfony AI in Action - SymfonyLive Berlin 2026
chr_hertel
1
150
Cloudflare で始める Data Platform
ta93abe
0
110
サプライチェーン攻撃対策「層を重ねて落ちない壁」を10日間で組み上げた話 #TechLeadConf2026
kashewnuts
1
280
検索設計から 推論設計への重心移動と Recall-First Retrieval
po3rin
5
1.7k
AgentCore Optimizationを始めよう!
licux
3
240
書籍「ユーザーストーリーマッピング」が私のバイブル
asumikam
4
490
t *testing.T は どこからやってくるの?
otakakot
1
940
継続的な負荷検証を目指して
pyama86
3
1.2k
SREに優しいTerraform構成 modulesとstateの組み方
hiyanger
2
180
【ディップ|26年新卒研修資料】OpenAPI/Swagger REST API研修
dip_tech
PRO
0
160
20年以上続くプロダクトでも使い続けられる静的解析ツールを求めて
matsuo_atsushi
0
150
SkillsをS3 Filesに置く時のあれこれ
watany
3
1.6k
Featured
See All Featured
4 Signs Your Business is Dying
shpigford
187
22k
HDC tutorial
michielstock
2
660
Future Trends and Review - Lecture 12 - Web Technologies (1019888BNR)
signer
PRO
0
3.5k
SEO in 2025: How to Prepare for the Future of Search
ipullrank
3
3.4k
Joys of Absence: A Defence of Solitary Play
codingconduct
1
360
The Myth of the Modular Monolith - Day 2 Keynote - Rails World 2024
eileencodes
28
3.5k
Mozcon NYC 2025: Stop Losing SEO Traffic
samtorres
0
230
The Invisible Side of Design
smashingmag
302
52k
Highjacked: Video Game Concept Design
rkendrick25
PRO
1
350
Fantastic passwords and where to find them - at NoRuKo
philnash
52
3.7k
Docker and Python
trallard
47
3.8k
A brief & incomplete history of UX Design for the World Wide Web: 1989–2019
jct
2
370
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/