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
Sponsored
·
Your Podcast. Everywhere. Effortlessly.
Share. Educate. Inspire. Entertain. You do you. We'll handle the rest.
→
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
These Five Tricks Can Make Your Apps Greener, Cheaper, & Nicer
hollycummins
0
270
肥大化するレガシーコードに立ち向かうためのインターフェース分離と依存の逆転 / JJUG CCC 2026 Spring
hirokunimaeta
0
490
Oxcを導入して開発体験が向上した話
yug1224
4
280
代数的データ型って何が嬉しいの? #frontend_phpcon_do
kajitack
8
3.2k
Swiftのレキシカルスコープ管理
kntkymt
0
210
AIエージェントと協働するCLI開発 — BunとOpenClawで学んだこと
yoshikouki
1
230
決定論的オーケストレーションの設計と実装 / Design and Implementation of Deterministic Orchestration
nrslib
3
980
Oxlintのカスタムルールの現況
syumai
5
990
SPMマルチモジュールで テストカバレッジを取得する技法
yosshi4486
0
140
GitHub Copilot CLIのいいところ
htkym
2
1.3k
TSKaigi Night Talks 2026_TypeScriptでサプライチェーンの整合性を型に閉じ込める
geekplus_tech
0
260
タクシーアプリ『GO』の バックエンド開発のおける AI利活用と若者のすべて
pyama86
3
1.8k
Featured
See All Featured
Why Our Code Smells
bkeepers
PRO
340
58k
Tips & Tricks on How to Get Your First Job In Tech
honzajavorek
1
530
Un-Boring Meetings
codingconduct
0
310
Building Applications with DynamoDB
mza
96
7.1k
New Earth Scene 8
popppiees
3
2.3k
The Cost Of JavaScript in 2023
addyosmani
55
10k
Cheating the UX When There Is Nothing More to Optimize - PixelPioneers
stephaniewalter
287
14k
A brief & incomplete history of UX Design for the World Wide Web: 1989–2019
jct
2
390
Design of three-dimensional binary manipulators for pick-and-place task avoiding obstacles (IECON2024)
konakalab
0
440
Impact Scores and Hybrid Strategies: The future of link building
tamaranovitovic
0
300
Tell your own story through comics
letsgokoyo
1
940
JAMstack: Web Apps at Ludicrous Speed - All Things Open 2022
reverentgeek
1
460
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/