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
150
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
200
Simplifying systems with Elixir - Belgrade
sasajuric
3
490
Simplifying systems with Elixir
sasajuric
2
600
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
RTSPクライアントを自作してみた話
simotin13
0
610
エンジニアと一緒にテストコードの設計と実装を改善した話
mototakatsu
0
200
その問い、本当に正しいですか?AI時代のエンジニアに必要な哲学と認知科学 / ai-philosophy-cognitive-science
minodriven
11
5.8k
Webフレームワークの ベンチマークについて
yusukebe
0
170
気圧・高度・GPSを記録&可視化するアプリ「Koudo」を作った話
hjmkth
1
270
ECSアプリログをFireLensでコスト削減しようとしたけど諦めた話 in Fargate×Node.js
akihisaikeda
2
4.2k
JJUG CCC 2026 Spring: JSpecify で実現する Kotlin フレンドリーな Java API 設計
ternbusty
1
180
AI 時代のソフトウェア設計の学び方
masuda220
PRO
29
13k
LLMによるContent Moderationの本番運用の裏側と品質担保への挑戦
suikabar
3
700
3Dシーンの圧縮
fadis
1
780
代数的データ型って何が嬉しいの? #frontend_phpcon_do
kajitack
8
3.7k
正しくソフトウェアを作る、前提を疑うための認知の視点 / doubt-premise
minodriven
21
6.7k
Featured
See All Featured
Rebuilding a faster, lazier Slack
samanthasiow
85
9.5k
Designing Powerful Visuals for Engaging Learning
tmiket
1
420
Technical Leadership for Architectural Decision Making
baasie
3
410
WCS-LA-2024
lcolladotor
0
640
What the history of the web can teach us about the future of AI
inesmontani
PRO
1
610
[SF Ruby Conf 2025] Rails X
palkan
2
1.1k
Beyond borders and beyond the search box: How to win the global "messy middle" with AI-driven SEO
davidcarrasco
3
160
Marketing to machines
jonoalderson
1
5.5k
Building a Modern Day E-commerce SEO Strategy
aleyda
45
9.1k
The Psychology of Web Performance [Beyond Tellerrand 2023]
tammyeverts
49
3.5k
Intergalactic Javascript Robots from Outer Space
tanoku
273
27k
4 Signs Your Business is Dying
shpigford
187
22k
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/