Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
Solid Ground
Search
Sponsored
·
SiteGround - Reliable hosting with speed, security, and support you can count on.
→
Saša Jurić
March 06, 2017
Programming
960
3
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Solid Ground
ElixirDaze 2017
Video available at
https://www.youtube.com/watch?v=5SbWapbXhKo
Saša Jurić
March 06, 2017
Transcript
25 slides
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
More Decks by Saša Jurić
See All by Saša Jurić
Such Great Heights, Code BEAM Lite, Amsterdam 2018
sasajuric
0
220
Simplifying systems with Elixir - Belgrade
sasajuric
3
500
Simplifying systems with Elixir
sasajuric
2
630
Metagrokking Elixir
sasajuric
4
350
Solid Ground
sasajuric
15
1.3k
Elixir - valentine edition
sasajuric
0
160
What's the fuss about Phoenix?
sasajuric
2
1.2k
Phoenix
sasajuric
1
310
Phoenix
sasajuric
0
180
Other Decks in Programming
See All in Programming
Vue.jsで作る空間解析アプリとCapacitorプラグインのData Bridge
hal_spidernight
1
180
はじめてのPLATEAU
nokonoko1203
1
660
コード生成時代のAPI定義を支えるRequest Spec移行
pvcresin
0
290
複数ドメインを一つのアプリに統合するFlutterの設計と運用_FlutterKaigi2026登壇資料(須永高弘)
takahirosunaga
0
200
オーケストレーション記述言語 Katari
yukikurage
0
270
AWS CDKを理解するために公式の定義を深掘って解説してみる / Understanding AWS CDK by Digging into Its Official Definition
akihisaikeda
3
320
LLM 101
dalinaum
0
510
学びを記事・スライド・Xへ高速展開する― AI-assisted Learning Loopで回すコンテンツ生成術
ochtum
0
210
Enforcing Your Architecture with Unit Tests in the AI Era (Swift Connection X)
steliosf
PRO
1
190
React Native経験者が Flutterを30⽇間触って驚いたこと
3saito
0
200
小さなアプリを作って公開するまで
onozaty
0
200
RaspberryPi 5で軽くはじめるk3sとtailscaleを用いたホームサーバー構築 (1)
nasum
0
410
Featured
See All Featured
Performance Is Good for Brains [We Love Speed 2024]
tammyeverts
12
2k
Imperfection Machines: The Place of Print at Facebook
scottboms
270
14k
Ten Tips & Tricks for a 🌱 transition
stuffmc
1
290
Raft: Consensus for Rubyists
vanstee
143
7.9k
Principles of Awesome APIs and How to Build Them.
keavy
128
18k
Tips & Tricks on How to Get Your First Job In Tech
honzajavorek
1
850
Navigating Algorithm Shifts & AI Overviews - #SMXNext
aleyda
1
1.7k
Efficient Content Optimization with Google Search Console & Apps Script
katarinadahlin
PRO
1
1k
A Soul's Torment
seathinner
9
3.9k
The Impact of AI in SEO - AI Overviews June 2024 Edition
aleyda
6
1.3k
Primal Persuasion: How to Engage the Brain for Learning That Lasts
tmiket
0
520
The SEO identity crisis: Don't let AI make you average
varn
0
630