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
160
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
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
210
Simplifying systems with Elixir - Belgrade
sasajuric
3
490
Simplifying systems with Elixir
sasajuric
2
620
Metagrokking Elixir
sasajuric
4
330
Solid Ground
sasajuric
15
1.3k
Solid Ground
sasajuric
3
940
What's the fuss about Phoenix?
sasajuric
2
1.2k
Phoenix
sasajuric
1
270
Phoenix
sasajuric
0
160
Other Decks in Programming
See All in Programming
思考垂れ流し開発 ~音声入力 × AIエージェント × 開発ハーネスによる試行錯誤~
npostring
0
180
170k Jobs a Day on GKE: Scaling Mercari's CI Platform - and What's Next for AI-Native Development
junyaokabe
0
120
そこに3びきプロダクトがいるじゃろう——生成AI時代における“価値が届かない理由”の構造
kosuket
0
580
go-spidermonkeyでAIエージェントのCode Modeを実装する
syumai
2
1.2k
Go を使い始めて 2 ヶ月の学び / My first two months with Go
contour_gara
0
380
Press start. Python's next generation.
willingc
PRO
3
130
Hono + Inertia + React で LP を構築した話
oukayuka
2
170
書籍「プロフェッショナルAI駆動開発」紹介スライド
juntaromatsumoto
0
570
How I Won Prize Money at a Hackathon Using Codex and Symphony Alpha
yasei_no_otoko
0
120
komatsuna「分散システムにおけるバグ分析手法」
komatsunaqa
0
280
ここ半年くらいでAIに作らせたR用ツール
eitsupi
0
400
「寝てても仕事が進む」Claude Codeで組む第二の脳
tomoyafujita2016
0
360
Featured
See All Featured
Mozcon NYC 2025: Stop Losing SEO Traffic
samtorres
1
500
4 Signs Your Business is Dying
shpigford
187
23k
New Earth Scene 8
popppiees
3
2.5k
Java REST API Framework Comparison - PWX 2021
mraible
34
9.7k
Navigating the Design Leadership Dip - Product Design Week Design Leaders+ Conference 2024
apolaine
2
400
The Cost Of JavaScript in 2023
addyosmani
55
10k
AI Search: Where Are We & What Can We Do About It?
aleyda
0
7.8k
How to make the Groovebox
asonas
2
2.3k
Digital Projects Gone Horribly Wrong (And the UX Pros Who Still Save the Day) - Dean Schuster
uxyall
1
2.5k
Introduction to Domain-Driven Design and Collaborative software design
baasie
1
950
The Invisible Side of Design
smashingmag
301
52k
Stop Working from a Prison Cell
hatefulcrawdad
274
21k
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/