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
Snowflakeで眠ったデータを起こそう!
estie
0
110
Amazon SQSコンシューマー疎結合への旅 - 出張! #DevelopersIO IT技術ブログの中の人が語る勉強会 #3
quiver
0
230
[技育CAMPアカデミア]アイディアを形に!【超入門】スマホアプリ開発〜リリースまでの流れをご紹介
teamlab
PRO
0
360
"config" ってなんだ? / What is "config"?
okashoi
0
240
Rubyでたのしむクリエイティブコーディング/Enjoy Creative coding with Ruby
chobishiba
1
170
VSCodeでのDatabricks開発もお勧めしたい/I would also recommend Databricks development with VSCode.
kazumain
0
250
Prepare for Jakarta EE 11 - Performance and Developer Productivity
ivargrimstad
0
700
Semantic search with Django and pgvector
pauloxnet
0
240
デフォルトにして至高、RubyMineの大好きな所
ruzia
0
260
エンターテイメント業界で利用されるAWS
demuyan
0
210
Komplexe Oberflächen mit SVG und der Web Animation API
joergneumann
0
670
Changed Rules: Architectures with Lightweight Stores
manfredsteyer
PRO
0
240
Featured
See All Featured
Designing Dashboards & Data Visualisations in Web Apps
destraynor
226
51k
The Invisible Side of Design
smashingmag
294
49k
Practical Orchestrator
shlominoach
182
9.7k
CSS Pre-Processors: Stylus, Less & Sass
bermonpainter
352
28k
Six Lessons from altMBA
skipperchong
21
3k
Building Better People: How to give real-time feedback that sticks.
wjessup
355
18k
What's in a price? How to price your products and services
michaelherold
237
11k
Creating an realtime collaboration tool: Agile Flush - .NET Oxford
marcduiker
14
1.5k
A Modern Web Designer's Workflow
chriscoyier
689
190k
Writing Fast Ruby
sferik
621
60k
No one is an island. Learnings from fostering a developers community.
thoeni
16
2.1k
From Idea to $5000 a Month in 5 Months
shpigford
377
45k
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