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
Sponsored
·
SiteGround - Reliable hosting with speed, security, and support you can count on.
→
Saša Jurić
February 14, 2017
Programming
0
140
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
190
Simplifying systems with Elixir - Belgrade
sasajuric
3
470
Simplifying systems with Elixir
sasajuric
2
580
Metagrokking Elixir
sasajuric
4
300
Solid Ground
sasajuric
15
1.2k
Solid Ground
sasajuric
3
900
What's the fuss about Phoenix?
sasajuric
2
1.1k
Phoenix
sasajuric
1
240
Phoenix
sasajuric
0
130
Other Decks in Programming
See All in Programming
CSC307 Lecture 06
javiergs
PRO
0
670
Basic Architectures
denyspoltorak
0
640
AI Schema Enrichment for your Oracle AI Database
thatjeffsmith
0
180
コマンドとリード間の連携に対する脅威分析フレームワーク
pandayumi
1
430
AI によるインシデント初動調査の自動化を行う AI インシデントコマンダーを作った話
azukiazusa1
1
610
gunshi
kazupon
1
140
プロダクトオーナーから見たSOC2 _SOC2ゆるミートアップ#2
kekekenta
0
150
フルサイクルエンジニアリングをAI Agentで全自動化したい 〜構想と現在地〜
kamina_zzz
0
390
16年目のピクシブ百科事典を支える最新の技術基盤 / The Modern Tech Stack Powering Pixiv Encyclopedia in its 16th Year
ahuglajbclajep
5
940
ELYZA_Findy AI Engineering Summit登壇資料_AIコーディング時代に「ちゃんと」やること_toB LLMプロダクト開発舞台裏_20251216
elyza
2
1.3k
CSC307 Lecture 01
javiergs
PRO
0
680
GISエンジニアから見たLINKSデータ
nokonoko1203
0
190
Featured
See All Featured
How People are Using Generative and Agentic AI to Supercharge Their Products, Projects, Services and Value Streams Today
helenjbeal
1
100
Public Speaking Without Barfing On Your Shoes - THAT 2023
reverentgeek
1
300
End of SEO as We Know It (SMX Advanced Version)
ipullrank
3
3.9k
AI Search: Where Are We & What Can We Do About It?
aleyda
0
6.9k
The Director’s Chair: Orchestrating AI for Truly Effective Learning
tmiket
1
84
Practical Orchestrator
shlominoach
191
11k
The Straight Up "How To Draw Better" Workshop
denniskardys
239
140k
Evolving SEO for Evolving Search Engines
ryanjones
0
110
The Curse of the Amulet
leimatthew05
1
7.9k
Why Our Code Smells
bkeepers
PRO
340
58k
Git: the NoSQL Database
bkeepers
PRO
432
66k
Agile Actions for Facilitating Distributed Teams - ADO2019
mkilby
0
110
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/