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
Simplifying systems with Elixir - Belgrade
Search
Saša Jurić
October 25, 2018
Programming
490
3
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Simplifying systems with Elixir - Belgrade
Saša Jurić
October 25, 2018
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
sasajuric
2
600
Metagrokking Elixir
sasajuric
4
320
Solid Ground
sasajuric
15
1.3k
Solid Ground
sasajuric
3
930
Elixir - valentine edition
sasajuric
0
150
What's the fuss about Phoenix?
sasajuric
2
1.1k
Phoenix
sasajuric
1
260
Phoenix
sasajuric
0
160
Other Decks in Programming
See All in Programming
PHPで使える日時の表現と、その知り方 #frontend_phpcon_do
o0h
PRO
0
190
JJUG CCC 2026 Spring: JSpecify で実現する Kotlin フレンドリーな Java API 設計
ternbusty
1
140
代数的データ型って何が嬉しいの? #frontend_phpcon_do
kajitack
8
3.2k
[2026年度第1回ORセミナー] 計画最適化ベンチャーと競技プログラミング人材
terryu16
0
250
運用エージェントは "作る" から "育てる" へ - 記憶と自己進化の3層設計パターン / self-evolving-agents-three-layer-agent-design
gawa
12
3.5k
SPMマルチモジュールで テストカバレッジを取得する技法
yosshi4486
0
140
決定論的オーケストレーションの設計と実装 / Design and Implementation of Deterministic Orchestration
nrslib
3
1.1k
Lemonade + Foundry Toolkit でお手軽アプリ開発
seosoft
1
310
Semantic Version 単位で戦略を柔軟に変えて、パッケージアップデートを自動化する
daitasu
0
140
Claspは野良GASの夢をみるか
takter00
0
170
柔軟なPDFレイアウトエディタを支える型システム設計 — Discriminated UnionとConditional Typeの実践
minako__ph
4
1.4k
肥大化するレガシーコードに立ち向かうためのインターフェース分離と依存の逆転 / JJUG CCC 2026 Spring
hirokunimaeta
0
500
Featured
See All Featured
Build The Right Thing And Hit Your Dates
maggiecrowley
39
3.2k
The Art of Programming - Codeland 2020
erikaheidi
57
14k
[Rails World 2023 - Day 1 Closing Keynote] - The Magic of Rails
eileencodes
38
2.9k
CoffeeScript is Beautiful & I Never Want to Write Plain JavaScript Again
sstephenson
162
16k
4 Signs Your Business is Dying
shpigford
187
22k
End of SEO as We Know It (SMX Advanced Version)
ipullrank
3
4.2k
Designing Powerful Visuals for Engaging Learning
tmiket
1
400
Bootstrapping a Software Product
garrettdimon
PRO
307
120k
The Illustrated Children's Guide to Kubernetes
chrisshort
51
52k
HDC tutorial
michielstock
2
690
Stewardship and Sustainability of Urban and Community Forests
pwiseman
0
220
Helping Users Find Their Own Way: Creating Modern Search Experiences
danielanewman
31
3.2k
Transcript
Simplifying systems with Elixir @sasajuric aircloak.com
Elixir functional concurrent
process ... foo(...) bar(...) ...
functional Elixir modules and functions immutable data first-class functions
... spawn(fn -> ... end) ...
process A ... foo(...) bar(...) ... process B ... baz(...)
qux(...) ...
send( process_b, some_message ) receive do message -> handle(message) end
process a process b
BEAM (Erlang VM)
BEAM (Erlang VM)
scheduler scheduler scheduler scheduler BEAM (Erlang VM) CPU CPU CPU
CPU
concurrent functional
activities incoming requests background jobs in-memory state load control …
managing activities multiple OS processes 3rd party products service managers
None
None
uniformity simpler development simpler testing simpler deployment simpler maintenance improved
collaboration
None
theerlangelist.com
git clone https://github.com/sasa1977/erlangelist.git mix deps.get && pushd assets && npm
install && popd iex -S mix phx.server
None
serving requests
http listener https listener
http listener https listener handler 1 handler 2 handler n
…
usage stats
stats collector handler handler handler
stats collector disk writer
def store(path, data) do File.write!( path, :erlang.term_to_binary(data) ) end
def read(path, default) do path |> File.read!() |> :erlang.binary_to_term() rescue
ArgumentError -> default end
cleanup
scheduler cleanup job periodically starts
HTTPS
our system CA server certificate request challenge info challenge
certifier http server usage stats
dev CA server
service management
defmodule StatsCollector do def start_link() do # ... end #
... end
Supervisor.start_link( [ StatsCollector, Cleanup ], # .. )
supervisor stats collector cleanup
supervisor worker
1
1 2
1 2 3 4 5
1 2 6 9 7 8 3 4 5
erlangelist usage stats web
usage stats stats collector cleanup
web ACME server main site certifier
None
technical feature built-in options services GenServer, Task service manager Supervisor
service registry Registry k-v ets, mnesia web server phoenix, plug, cowboy periodical jobs :timer, quantum, periodic load regulation jobs, safetyvalve, sbroker concurrent flows Flow, GenStage
Elixir in a nutshell start simple go far
Elixir guides Phoenix guides Learning resources Elixir forum
40% off using code ctwelixirbg18 at manning.com slides available at
bit.ly/elixirbg102018