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
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
180
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
890
What's the fuss about Phoenix?
sasajuric
2
1.1k
Phoenix
sasajuric
1
240
Phoenix
sasajuric
0
120
Other Decks in Programming
See All in Programming
Deno Tunnel を使ってみた話
kamekyame
0
260
Implementation Patterns
denyspoltorak
0
130
Navigating Dependency Injection with Metro
l2hyunwoo
1
190
Python札幌 LT資料
t3tra
7
1.1k
Jetpack XR SDKから紐解くAndroid XR開発と技術選定のヒント / about-androidxr-and-jetpack-xr-sdk
drumath2237
1
190
Canon EOS R50 V と R5 Mark II 購入でみえてきた最近のデジイチ VR180 事情、そして VR180 静止画に活路を見出すまで
karad
0
140
AIコーディングエージェント(NotebookLM)
kondai24
0
240
0→1 フロントエンド開発 Tips🚀 #レバテックMeetup
bengo4com
0
410
AI前提で考えるiOSアプリのモダナイズ設計
yuukiw00w
0
190
Tinkerbellから学ぶ、Podで DHCPをリッスンする手法
tomokon
0
150
【卒業研究】会話ログ分析によるユーザーごとの関心に応じた話題提案手法
momok47
0
130
DevFest Android in Korea 2025 - 개발자 커뮤니티를 통해 얻는 가치
wisemuji
0
170
Featured
See All Featured
Agile that works and the tools we love
rasmusluckow
331
21k
How to Create Impact in a Changing Tech Landscape [PerfNow 2023]
tammyeverts
55
3.2k
Why Mistakes Are the Best Teachers: Turning Failure into a Pathway for Growth
auna
0
29
How to train your dragon (web standard)
notwaldorf
97
6.5k
Prompt Engineering for Job Search
mfonobong
0
130
Why Your Marketing Sucks and What You Can Do About It - Sophie Logan
marketingsoph
0
48
Reality Check: Gamification 10 Years Later
codingconduct
0
1.9k
Stop Working from a Prison Cell
hatefulcrawdad
273
21k
The MySQL Ecosystem @ GitHub 2015
samlambert
251
13k
HU Berlin: Industrial-Strength Natural Language Processing with spaCy and Prodigy
inesmontani
PRO
0
110
State of Search Keynote: SEO is Dead Long Live SEO
ryanjones
0
73
Self-Hosted WebAssembly Runtime for Runtime-Neutral Checkpoint/Restore in Edge–Cloud Continuum
chikuwait
0
240
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/