Upgrade to PRO for Only $50/Year—Limited-Time Offer! 🔥
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
3
460
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
180
Simplifying systems with Elixir
sasajuric
2
580
Metagrokking Elixir
sasajuric
4
300
Solid Ground
sasajuric
15
1.2k
Solid Ground
sasajuric
3
890
Elixir - valentine edition
sasajuric
0
140
What's the fuss about Phoenix?
sasajuric
2
1.1k
Phoenix
sasajuric
1
230
Phoenix
sasajuric
0
120
Other Decks in Programming
See All in Programming
connect-python: convenient protobuf RPC for Python
anuraaga
0
370
スタートアップを支える技術戦略と組織づくり
pospome
8
15k
How Software Deployment tools have changed in the past 20 years
geshan
0
28k
令和最新版Android Studioで化石デバイス向けアプリを作る
arkw
0
340
30分でDoctrineの仕組みと使い方を完全にマスターする / phpconkagawa 2025 Doctrine
ttskch
3
780
これだけで丸わかり!LangChain v1.0 アップデートまとめ
os1ma
6
1.4k
Herb to ReActionView: A New Foundation for the View Layer @ San Francisco Ruby Conference 2025
marcoroth
0
250
無秩序からの脱却 / Emergence from chaos
nrslib
2
12k
CloudNative Days Winter 2025: 一週間で作る低レイヤコンテナランタイム
ternbusty
7
2k
LLM Çağında Backend Olmak: 10 Milyon Prompt'u Milisaniyede Sorgulamak
selcukusta
0
100
著者と進める!『AIと個人開発したくなったらまずCursorで要件定義だ!』
yasunacoffee
0
120
Integrating WordPress and Symfony
alexandresalome
0
130
Featured
See All Featured
Scaling GitHub
holman
464
140k
The Illustrated Children's Guide to Kubernetes
chrisshort
51
51k
Sharpening the Axe: The Primacy of Toolmaking
bcantrill
46
2.6k
Git: the NoSQL Database
bkeepers
PRO
432
66k
Code Review Best Practice
trishagee
73
19k
Statistics for Hackers
jakevdp
799
230k
実際に使うSQLの書き方 徹底解説 / pgcon21j-tutorial
soudai
PRO
196
69k
Bash Introduction
62gerente
615
210k
For a Future-Friendly Web
brad_frost
180
10k
Bootstrapping a Software Product
garrettdimon
PRO
307
120k
Visualization
eitanlees
150
16k
Raft: Consensus for Rubyists
vanstee
141
7.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