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
770
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
400
Simplifying systems with Elixir
sasajuric
2
540
Metagrokking Elixir
sasajuric
4
280
Solid Ground
sasajuric
15
1.1k
Elixir - valentine edition
sasajuric
0
120
What's the fuss about Phoenix?
sasajuric
2
980
Phoenix
sasajuric
1
200
Phoenix
sasajuric
0
110
Other Decks in Programming
See All in Programming
Rubyでたのしむクリエイティブコーディング/Enjoy Creative coding with Ruby
chobishiba
1
160
Ruby製社内ツールのGo移行
bgpat
2
330
元気予報
suu_mire0726
0
860
Designing for tomorrow's programming workflows
honnibal
PRO
2
110
SpringBoot+MyBatisで例外が出たときどこを見るか
syukai
0
110
プールにゆこう
irof
2
120
Prepare for Jakarta EE 11 - Performance and Developer Productivity
ivargrimstad
0
430
TYPO3 v13 – The road to LTS: What's new and new APIs
luisasofie_xoxo
0
180
[SF Ruby, March 2024] Rails on Wasm
palkan
0
370
チーム力を高めるスクラム実践法:カンバン公開と課題攻略について - ニフティのスクラムトーク Vol. 2 - NIFTY Tech Talk #18
niftycorp
PRO
1
110
今、知っておきたい! 生成AIエージェントの世界
elith
3
340
"config" ってなんだ? / What is "config"?
okashoi
0
220
Featured
See All Featured
How to Ace a Technical Interview
jacobian
272
22k
Intergalactic Javascript Robots from Outer Space
tanoku
266
26k
10 Git Anti Patterns You Should be Aware of
lemiorhan
646
57k
Practical Orchestrator
shlominoach
181
9.7k
Easily Structure & Communicate Ideas using Wireframe
afnizarnur
186
16k
Build The Right Thing And Hit Your Dates
maggiecrowley
23
2k
XXLCSS - How to scale CSS and keep your sanity
sugarenia
240
1.2M
How to name files
jennybc
64
92k
JavaScript: Past, Present, and Future - NDC Porto 2020
reverentgeek
39
4.4k
[Rails World 2023 - Day 1 Closing Keynote] - The Magic of Rails
eileencodes
1
1.3k
個人開発の失敗を避けるイケてる考え方 / tips for indie hackers
panda_program
60
14k
Responsive Adventures: Dirty Tricks From The Dark Corners of Front-End
smashingmag
243
20k
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