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
140
0
Share
Elixir - valentine edition
Saša Jurić
February 14, 2017
More Decks by Saša Jurić
See All by Saša Jurić
Such Great Heights, Code BEAM Lite, Amsterdam 2018
sasajuric
0
200
Simplifying systems with Elixir - Belgrade
sasajuric
3
480
Simplifying systems with Elixir
sasajuric
2
590
Metagrokking Elixir
sasajuric
4
310
Solid Ground
sasajuric
15
1.3k
Solid Ground
sasajuric
3
920
What's the fuss about Phoenix?
sasajuric
2
1.1k
Phoenix
sasajuric
1
250
Phoenix
sasajuric
0
140
Other Decks in Programming
See All in Programming
(Re)make Regexp in Ruby: Democratizing internals for the JIT
makenowjust
2
180
VueエンジニアがReactを触って感じた_設計の違い
koukimiura
0
180
Cache-moi si tu peux : patterns et pièges du cache en production - Devoxx France 2026 - Conférence
slecache
0
240
Offline should be the norm: building local-first apps with CRDTs & Kotlin Multiplatform
renaudmathieu
0
210
AWSコミュニティ活動は顧客のクラウド推進に効くのか / Do AWS community activities help customers adopt the cloud?
seike460
PRO
0
140
今こそ押さえておきたい アマゾンウェブサービス(AWS)の データベースの基礎 おもクラ #6版
satoshi256kbyte
1
250
AIベース静的検査器の偽陽性率を抑える工夫3選
orgachem
PRO
3
300
[RubyKaigi 2026] Require Hooks
palkan
1
200
クラウドネイティブなエンジニアに向ける Raycastの魅力と実際の活用事例
nealle
2
200
HTML-Aware ERB: The Path to Reactive Rendering @ RubyKaigi 2026, Hakodate, Japan
marcoroth
0
140
Making the RBS Parser Faster
soutaro
0
370
The Less-Told Story of Socket Timeouts
coe401_
3
200
Featured
See All Featured
Avoiding the “Bad Training, Faster” Trap in the Age of AI
tmiket
0
130
Performance Is Good for Brains [We Love Speed 2024]
tammyeverts
12
1.6k
Neural Spatial Audio Processing for Sound Field Analysis and Control
skoyamalab
0
260
The Power of CSS Pseudo Elements
geoffreycrofte
82
6.2k
How to Grow Your eCommerce with AI & Automation
katarinadahlin
PRO
1
170
Measuring Dark Social's Impact On Conversion and Attribution
stephenakadiri
1
190
Conquering PDFs: document understanding beyond plain text
inesmontani
PRO
4
2.6k
Unlocking the hidden potential of vector embeddings in international SEO
frankvandijk
0
770
WENDY [Excerpt]
tessaabrams
10
37k
Dominate Local Search Results - an insider guide to GBP, reviews, and Local SEO
greggifford
PRO
0
140
Mozcon NYC 2025: Stop Losing SEO Traffic
samtorres
0
210
Principles of Awesome APIs and How to Build Them.
keavy
128
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/