Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
Elixir - valentine edition
Search
Sponsored
·
SiteGround - Reliable hosting with speed, security, and support you can count on.
→
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
630
Metagrokking Elixir
sasajuric
4
340
Solid Ground
sasajuric
15
1.3k
Solid Ground
sasajuric
3
950
What's the fuss about Phoenix?
sasajuric
2
1.2k
Phoenix
sasajuric
1
300
Phoenix
sasajuric
0
170
Other Decks in Programming
See All in Programming
Starting & Sustaining Code-Based E2E Testing for Non-Coding QA Teams( #jasstniigata )
teyamagu
PRO
1
740
iOSDC Japan 2026 - Swiftで作って学ぼう!データベース自作入門
kaseken
2
400
Apple Intelligence を用いた個人情報誤送信防止、及びユーザーリクエスト体験の改善について
yukiny
0
240
thread_parallel_with_free-threaded_Python_and_NumPy.pdf
riku_sakamoto
0
370
ハーネス設計入門 〜 基礎知識の整理から実務へのステップアップ 〜
kinopeee
18
19k
Heart of Swift Concurrency
koher
0
1.1k
Go × SIMDで高速化するベクトル検索 ~ルーフラインモデルでSIMDが効く境界を探れ! ~
po3rin
1
4.9k
The Rails Doctrine Decade
koic
2
410
Ghostty + Neovimで作る 透明でカッコ良い開発環境
j341nono
0
140
選挙速報を多くのユーザーへ 届ける Live Activities 設計
hamayokokuririn
0
190
そのリトライ、死んだコネクションを使い回していませんか ── GoのHTTPクライアントとHTTP/2を実プロダクト障害から学び直す
myus4a
0
330
一人だけ、Kiroが静止する日
hideg
0
140
Featured
See All Featured
Ethics towards AI in product and experience design
skipperchong
2
400
A designer walks into a library…
pauljervisheath
211
25k
<Decoding/> the Language of Devs - We Love SEO 2024
nikkihalliwell
1
330
Java REST API Framework Comparison - PWX 2021
mraible
34
9.7k
Visualizing Your Data: Incorporating Mongo into Loggly Infrastructure
mongodb
50
10k
Data-driven link building: lessons from a $708K investment (BrightonSEO talk)
szymonslowik
1
1.3k
GraphQLとの向き合い方2022年版
quramy
50
15k
Sharpening the Axe: The Primacy of Toolmaking
bcantrill
46
3k
CSS Pre-Processors: Stylus, Less & Sass
bermonpainter
360
31k
Chrome DevTools: State of the Union 2024 - Debugging React & Beyond
addyosmani
10
1.4k
Beyond borders and beyond the search box: How to win the global "messy middle" with AI-driven SEO
davidcarrasco
3
270
Build The Right Thing And Hit Your Dates
maggiecrowley
39
3.5k
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/