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
Elixir - valentine edition
Search
Saša Jurić
February 14, 2017
Programming
0
130
Elixir - valentine edition
Saša Jurić
February 14, 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
170
Simplifying systems with Elixir - Belgrade
sasajuric
3
450
Simplifying systems with Elixir
sasajuric
2
570
Metagrokking Elixir
sasajuric
4
290
Solid Ground
sasajuric
15
1.2k
Solid Ground
sasajuric
3
870
What's the fuss about Phoenix?
sasajuric
2
1.1k
Phoenix
sasajuric
1
220
Phoenix
sasajuric
0
120
Other Decks in Programming
See All in Programming
「テストは愚直&&網羅的に書くほどよい」という誤解 / Test Smarter, Not Harder
munetoshi
0
190
なぜ「共通化」を考え、失敗を繰り返すのか
rinchoku
1
670
AI コーディングエージェントの時代へ:JetBrains が描く開発の未来
masaruhr
1
200
AIエージェントはこう育てる - GitHub Copilot Agentとチームの共進化サイクル
koboriakira
0
710
マッチングアプリにおけるフリックUIで苦労したこと
yuheiito
0
110
VS Code Update for GitHub Copilot
74th
2
670
ふつうの技術スタックでアート作品を作ってみる
akira888
1
1.2k
『自分のデータだけ見せたい!』を叶える──Laravel × Casbin で複雑権限をスッキリ解きほぐす 25 分
akitotsukahara
2
650
なんとなくわかった気になるブロックテーマ入門/contents.nagoya 2025 6.28
chiilog
1
280
20250708_JAWS_opscdk
takuyay0ne
2
120
Goで作る、開発・CI環境
sin392
0
260
GitHub Copilot and GitHub Codespaces Hands-on
ymd65536
2
150
Featured
See All Featured
The Power of CSS Pseudo Elements
geoffreycrofte
77
5.9k
BBQ
matthewcrist
89
9.7k
Java REST API Framework Comparison - PWX 2021
mraible
31
8.7k
Improving Core Web Vitals using Speculation Rules API
sergeychernyshev
18
980
Code Reviewing Like a Champion
maltzj
524
40k
Practical Tips for Bootstrapping Information Extraction Pipelines
honnibal
PRO
21
1.3k
The Cult of Friendly URLs
andyhume
79
6.5k
Designing for humans not robots
tammielis
253
25k
Creating an realtime collaboration tool: Agile Flush - .NET Oxford
marcduiker
30
2.1k
Building Applications with DynamoDB
mza
95
6.5k
Code Review Best Practice
trishagee
69
19k
Principles of Awesome APIs and How to Build Them.
keavy
126
17k
Transcript
Elixir @sasajuric aircloak.com
None
None
otpornost na pogreške skalabilnost responzivnost
Erlang LFE Elixir Erlang VM (BEAM)
None
v1 = f1(p1, p2, ...) v2 = f2(...) ...
spawn(fn -> ... end) A B
OS proces BEAM proces
scheduler scheduler scheduler scheduler BEAM instanca CPU CPU CPU CPU
pid = spawn(fn -> ... end)
pid = spawn(fn -> ... end) send(pid, :ping)
spawn(fn -> receive do :ping -> # ... end end)
send(pid, {:ping, self()})
spawn(fn -> receive do {:ping, caller_pid} -> send(caller_pid, :pong) end
end)
send(pid, {:ping, self()}) receive do :pong -> # ... after
:timer.seconds(5) -> # ... end
pid = spawn(fn -> server_loop(state) end)
defp server_loop(state) do receive do message -> new_state = handle(state,
message) server_loop(new_state) end end
bank account balance
send(pid, {:deposit, 100}) send(pid, {:withdraw, 100}) send(pid, {:balance, self()}) receive
do balance -> # ... end
spawn(fn -> bank_account_loop(0) end)
def bank_account_loop(balance) do receive do {:deposit, amount} -> bank_account_loop(balance +
amount) {:withdraw, amount} -> bank_account_loop(balance - amount) {:balance, caller_pid} -> send(caller_pid, balance) bank_account_loop(balance) end end
bank account {:deposit, amount} {:withdraw, amount} :balance
None
db connection background job request handler state request handler request
handler request handler request handler request handler state state state background job background job background job db connection db connection db connection
A B C D E F
A exit notifikacija B C D E F
S S S W W S W W W S
W W
VM VM VM VM VM
VM send(pid, message) VM 1 send(pid, message) VM 2
elixir-lang.org phoenixframework.org adventofcode.com exercism.io elixirforum.com meetup.com/lambdazagreb/