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ć
March 06, 2017
Programming
3
840
Solid Ground
ElixirDaze 2017
Video available at
https://www.youtube.com/watch?v=5SbWapbXhKo
Saša Jurić
March 06, 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
160
Simplifying systems with Elixir - Belgrade
sasajuric
3
440
Simplifying systems with Elixir
sasajuric
2
560
Metagrokking Elixir
sasajuric
4
280
Solid Ground
sasajuric
15
1.2k
Elixir - valentine edition
sasajuric
0
120
What's the fuss about Phoenix?
sasajuric
2
1k
Phoenix
sasajuric
1
210
Phoenix
sasajuric
0
110
Other Decks in Programming
See All in Programming
From Translations to Multi Dimension Entities
alexanderschranz
2
130
useSyncExternalStoreを使いまくる
ssssota
6
1k
Refactor your code - refactor yourself
xosofox
1
260
ゆるやかにgolangci-lintのルールを強くする / Kyoto.go #56
utgwkk
1
350
.NET 9アプリをCGIとして レンタルサーバーで動かす
mayuki
1
770
ブラウザ単体でmp4書き出すまで - muddy-web - 2024-12
yue4u
2
460
第5回日本眼科AI学会総会_AIコンテスト_3位解法
neilsaw
0
170
創造的活動から切り拓く新たなキャリア 好きから始めてみる夜勤オペレーターからSREへの転身
yjszk
1
130
CSC305 Lecture 25
javiergs
PRO
0
130
layerx_20241129.pdf
kyoheig3
2
290
命名をリントする
chiroruxx
1
380
ソフトウェアの振る舞いに着目し 複雑な要件の開発に立ち向かう
rickyban
0
890
Featured
See All Featured
Building a Scalable Design System with Sketch
lauravandoore
460
33k
実際に使うSQLの書き方 徹底解説 / pgcon21j-tutorial
soudai
169
50k
ピンチをチャンスに:未来をつくるプロダクトロードマップ #pmconf2020
aki_iinuma
111
49k
Responsive Adventures: Dirty Tricks From The Dark Corners of Front-End
smashingmag
251
21k
CSS Pre-Processors: Stylus, Less & Sass
bermonpainter
356
29k
Imperfection Machines: The Place of Print at Facebook
scottboms
266
13k
The Cost Of JavaScript in 2023
addyosmani
45
7k
Building Better People: How to give real-time feedback that sticks.
wjessup
365
19k
Making the Leap to Tech Lead
cromwellryan
133
9k
It's Worth the Effort
3n
183
28k
For a Future-Friendly Web
brad_frost
175
9.4k
Cheating the UX When There Is Nothing More to Optimize - PixelPioneers
stephaniewalter
280
13k
Transcript
Solid ground @sasajuric aircloak.com
None
long-running system many tasks soft real-time finite time program all-or-nothing
hard real-time
NIFs
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 t2 t3 t4 t5 t1 BEAM scheduler
t2 t3 t4 t5 t1 cooperative scheduler
thread 1 thread n … long running task long running
task blocked cooperative scheduler
thread 1 thread n … long running task long running
task not blocked :-) BEAM scheduler
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
runtime guarantees syntax developer friendliness ecosystem
Image credit Scales of Justice