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
830
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
150
Simplifying systems with Elixir - Belgrade
sasajuric
3
410
Simplifying systems with Elixir
sasajuric
2
550
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
DevFest Android in Korea 2024 - 안드로이드의 문단속 : 앱을 지키는 암호화 이야기
mdb1217
1
130
Vue :: Better Testing 2024
up1
1
380
"noncopyable types" の使いどころについて考えてみた
andpad
0
130
M5Stackボードの選び方
tanakamasayuki
0
200
ファーストペンギンBot @Qiita Hackathon 2024 予選
dyson_web
0
210
2024-10-02 dev2next - Application Observability like you've never heard before
jonatan_ivanov
0
160
MLOps in Mercari Group’s Trust and Safety ML Team
cjhj
1
110
NEWTにおけるiOS18対応の進め方
ryu1sazae
0
190
App Router 悲喜交々
quramy
7
370
"Swarming" をコンセプトに掲げるアジャイルチームのベストプラクティス
boykush
2
200
perl for shell, awk and sed programmers
mackee
1
340
WEBアプリケーションにおけるAWS Lambdaを用いた大規模な非同期処理の実践
delhi09
PRO
7
3.9k
Featured
See All Featured
YesSQL, Process and Tooling at Scale
rocio
167
14k
Let's Do A Bunch of Simple Stuff to Make Websites Faster
chriscoyier
504
140k
For a Future-Friendly Web
brad_frost
174
9.3k
Pencils Down: Stop Designing & Start Developing
hursman
119
11k
JavaScript: Past, Present, and Future - NDC Porto 2020
reverentgeek
45
4.9k
Fontdeck: Realign not Redesign
paulrobertlloyd
81
5.2k
The Brand Is Dead. Long Live the Brand.
mthomps
53
38k
What's new in Ruby 2.0
geeforr
341
31k
StorybookのUI Testing Handbookを読んだ
zakiyama
26
5.1k
Side Projects
sachag
452
42k
Design by the Numbers
sachag
278
19k
Become a Pro
speakerdeck
PRO
24
4.9k
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