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
·
Ship Features Fearlessly
Turn features on and off without deploys. Used by thousands of Ruby developers.
→
Saša Jurić
October 25, 2018
Programming
480
3
Share
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
150
Other Decks in Programming
See All in Programming
Skillは並べた。動かなかった。契約で繋いだ。— 65個のSkillから、自走する開発サイクルへ
junholee
0
650
[BalkanRuby 2026] Drop your app/services!
palkan
3
580
AWSはOSSをどのように 考えているのか?
akihisaikeda
0
120
Augmenting AI with the Power of Jakarta EE
ivargrimstad
0
570
Back to the roots of date
jinroq
0
900
継続的な負荷検証を目指して
pyama86
3
1.2k
Import assertionsが消えた日~ECMAScriptの仕様はどう決まり、なぜ覆るのか~
bicstone
2
190
SkillsをS3 Filesに置く時のあれこれ
watany
3
1.7k
密結合なバックエンドから TypeScript のコードを生成する
kemuridama
0
250
GoogleCloudとterraform完全に理解した
terisuke
1
200
運転動画を検索可能にする〜Cosmos-Embed1とDatabricks Vector Searchで〜/cosmos-embed1-databricks-vector-search
studio_graph
3
960
関係性から理解する"同一性"の型用語たち
pvcresin
1
250
Featured
See All Featured
The Mindset for Success: Future Career Progression
greggifford
PRO
0
330
Improving Core Web Vitals using Speculation Rules API
sergeychernyshev
21
1.5k
Self-Hosted WebAssembly Runtime for Runtime-Neutral Checkpoint/Restore in Edge–Cloud Continuum
chikuwait
0
530
Highjacked: Video Game Concept Design
rkendrick25
PRO
1
360
The Impact of AI in SEO - AI Overviews June 2024 Edition
aleyda
5
1.1k
What's in a price? How to price your products and services
michaelherold
247
13k
エンジニアに許された特別な時間の終わり
watany
106
240k
A Soul's Torment
seathinner
6
2.8k
Gemini Prompt Engineering: Practical Techniques for Tangible AI Outcomes
mfonobong
2
400
GraphQLとの向き合い方2022年版
quramy
50
15k
Sharpening the Axe: The Primacy of Toolmaking
bcantrill
46
2.8k
ReactJS: Keep Simple. Everything can be a component!
pedronauck
666
130k
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