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
850
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
1.1k
Phoenix
sasajuric
1
210
Phoenix
sasajuric
0
110
Other Decks in Programming
See All in Programming
functionalなアプローチで動的要素を排除する
ryopeko
1
210
ecspresso, ecschedule, lambroll を PipeCDプラグインとして動かしてみた (プロトタイプ) / Running ecspresso, ecschedule, and lambroll as PipeCD Plugins (prototype)
tkikuc
2
1.9k
見えないメモリを観測する: PHP 8.4 `pg_result_memory_size()` とSQL結果のメモリ管理
kentaroutakeda
0
940
週次リリースを実現するための グローバルアプリ開発
tera_ny
1
1.2k
サーバーゆる勉強会 DBMS の仕組み編
kj455
1
300
アクターシステムに頼らずEvent Sourcingする方法について
j5ik2o
6
700
AppRouterを用いた大規模サービス開発におけるディレクトリ構成の変遷と問題点
eiganken
1
450
PHPで学ぶプログラミングの教訓 / Lessons in Programming Learned through PHP
nrslib
4
1.1k
カンファレンス動画鑑賞会のススメ / Osaka.swift #1
hironytic
0
170
CQRS+ES の力を使って効果を感じる / Feel the effects of using the power of CQRS+ES
seike460
PRO
0
240
テストコードのガイドライン 〜作成から運用まで〜
riku929hr
7
1.4k
Beyond ORM
77web
11
1.6k
Featured
See All Featured
The Illustrated Children's Guide to Kubernetes
chrisshort
48
49k
Code Review Best Practice
trishagee
65
17k
The Art of Programming - Codeland 2020
erikaheidi
53
13k
Scaling GitHub
holman
459
140k
Designing on Purpose - Digital PM Summit 2013
jponch
116
7.1k
Raft: Consensus for Rubyists
vanstee
137
6.7k
The Myth of the Modular Monolith - Day 2 Keynote - Rails World 2024
eileencodes
19
2.3k
Agile that works and the tools we love
rasmusluckow
328
21k
Improving Core Web Vitals using Speculation Rules API
sergeychernyshev
3
180
Building Adaptive Systems
keathley
38
2.4k
Mobile First: as difficult as doing things right
swwweet
222
9k
Rebuilding a faster, lazier Slack
samanthasiow
79
8.8k
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