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
Sponsored
·
SiteGround - Reliable hosting with speed, security, and support you can count on.
→
Saša Jurić
October 25, 2018
Programming
3
470
Simplifying systems with Elixir - Belgrade
Saša Jurić
October 25, 2018
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
sasajuric
2
580
Metagrokking Elixir
sasajuric
4
300
Solid Ground
sasajuric
15
1.2k
Solid Ground
sasajuric
3
900
Elixir - valentine edition
sasajuric
0
140
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
公共交通オープンデータ × モバイルUX 複雑な運行情報を 『直感』に変換する技術
tinykitten
PRO
0
200
AIフル活用時代だからこそ学んでおきたい働き方の心得
shinoyu
0
120
The Art of Re-Architecture - Droidcon India 2025
siddroid
0
170
dchart: charts from deck markup
ajstarks
3
980
そのAIレビュー、レビューしてますか? / Are you reviewing those AI reviews?
rkaga
6
4.4k
HTTPプロトコル正しく理解していますか? 〜かわいい猫と共に学ぼう。ฅ^•ω•^ฅ ニャ〜
hekuchan
2
670
TerraformとStrands AgentsでAmazon Bedrock AgentCoreのSSO認証付きエージェントを量産しよう!
neruneruo
4
2.6k
ZJIT: The Ruby 4 JIT Compiler / Ruby Release 30th Anniversary Party
k0kubun
1
390
大規模Cloud Native環境におけるFalcoの運用
owlinux1000
0
260
Grafana:建立系統全知視角的捷徑
blueswen
0
310
GISエンジニアから見たLINKSデータ
nokonoko1203
0
190
OSSとなったswift-buildで Xcodeのビルドを差し替えられるため 自分でXcodeを直せる時代になっている ダイアモンド問題編
yimajo
3
580
Featured
See All Featured
Designing for Performance
lara
610
70k
Bioeconomy Workshop: Dr. Julius Ecuru, Opportunities for a Bioeconomy in West Africa
akademiya2063
PRO
1
51
Writing Fast Ruby
sferik
630
62k
Jess Joyce - The Pitfalls of Following Frameworks
techseoconnect
PRO
1
61
How to train your dragon (web standard)
notwaldorf
97
6.5k
16th Malabo Montpellier Forum Presentation
akademiya2063
PRO
0
44
The Straight Up "How To Draw Better" Workshop
denniskardys
239
140k
The SEO Collaboration Effect
kristinabergwall1
0
340
Avoiding the “Bad Training, Faster” Trap in the Age of AI
tmiket
0
65
What's in a price? How to price your products and services
michaelherold
247
13k
Navigating the moral maze — ethical principles for Al-driven product design
skipperchong
2
240
Lightning talk: Run Django tests with GitHub Actions
sabderemane
0
110
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