Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Speaker Deck
PRO
Sign in
Sign up for free
Erlang u praksi
Saša Jurić
November 24, 2012
Programming
1
280
Erlang u praksi
WebCamp Zagreb, 2012
Saša Jurić
November 24, 2012
Tweet
Share
More Decks by Saša Jurić
See All by Saša Jurić
Such Great Heights, Code BEAM Lite, Amsterdam 2018
sasajuric
0
130
Simplifying systems with Elixir - Belgrade
sasajuric
3
390
Simplifying systems with Elixir
sasajuric
3
520
Metagrokking Elixir
sasajuric
4
260
Solid Ground
sasajuric
16
1.1k
Solid Ground
sasajuric
3
640
Elixir - valentine edition
sasajuric
0
98
What's the fuss about Phoenix?
sasajuric
3
850
Phoenix
sasajuric
1
170
Other Decks in Programming
See All in Programming
Pluggable Storage in PostgreSQL
sira
1
200
How GitHub Supports Vim License Detection, The Five Years Journey
othree
1
390
kintone × LINE Bot で餃子検定Botを作った話
naberina
0
350
Pythonによる開発をアップデートするライブラリの紹介
daikikatsuragawa
1
810
Git Rebase
bkuhlmann
7
1.1k
Recap CDN, Edge, WebAssembly | ワインと鍋.js#1
sadnessojisan
2
1.2k
Amazon SageMakerでImagenを動かして猫画像生成してみた
hotoke_neko
0
120
このタイミングで知っておきたい 開発生産性の高いエンジニア組織の特徴とは / dev-sumi-20220721-productivity-features
findyinc
7
2.7k
Rust、何もわからない...#3
estie
0
170
Lookerとdbtの共存
ttccddtoki
0
670
SAM × Dockerでサーバーレス開発が超捗った話
yu_yukk_y
1
430
Atomic Design とテストの○○な話
takfjp
2
830
Featured
See All Featured
Raft: Consensus for Rubyists
vanstee
127
5.5k
The Brand Is Dead. Long Live the Brand.
mthomps
46
2.7k
Designing Dashboards & Data Visualisations in Web Apps
destraynor
223
49k
Rails Girls Zürich Keynote
gr2m
87
12k
Statistics for Hackers
jakevdp
782
210k
The Invisible Customer
myddelton
110
11k
jQuery: Nuts, Bolts and Bling
dougneiner
56
6.4k
The MySQL Ecosystem @ GitHub 2015
samlambert
239
11k
Ruby is Unlike a Banana
tanoku
91
9.3k
Building a Scalable Design System with Sketch
lauravandoore
448
30k
What's new in Ruby 2.0
geeforr
335
30k
Visualization
eitanlees
125
12k
Transcript
Erlang u praksi sasa.juric@minus5.hr
Korisnici
Platforma • jezik • framework (OTP) • runtime
Konkurentnost spawn(...)
Konkurentnost scheduler spawn(...)
Konkurentnost scheduler CPU scheduler CPU scheduler CPU scheduler CPU spawn(...)
Komunikacija P1 poruka P2 P2 = spawn(...), P2 ! Poruka
receive Poruka1 -> ... Poruka2 -> ... ... end
Komunikacija P1 poruka odgovor P2 P2 ! {self(), ...}, receive
... receive {Sender, ...} -> ... Sender ! Response end
Stanje A = 5, A = A + 1
Stanje S f(Stanje) -> Poruka = receive ... end, NovoStanje
= f2(Poruka, Stanje), f(NovoStanje).
Stanje {set, ...} {get, ...} P S f(Stanje) -> Poruka
= receive ... end, NovoStanje = f2(Poruka, Stanje), f(NovoStanje).
Actor model actor actor actor actor actor actor
Supervisor S W
Supervisor W S S S W W W S W
W W W
Http server http_server request_1 request_n request response response
Http server http_server stanje request_1 request_n request response response
Push server korisnik_1 korisnik_2 korisnik_n kanal_2 kanal_1 podaci podaci
Push server <= 3000 paralelnih korisnika ≈ 30 kanala >
2000 requesta u sekundi
Erlang • actor model • supervisor • distribuiranost • mnesia
• hot code swapping • interoperabilnost • alati
Primjena • server • skalabilnost • dinamički requesti
Linkovi • Why Erlang? • Programming Erlang • Learn You
Some Erlang for Great Good! • Erlang and OTP in Action • A History of Erlang • erlang.org • Erlang Programming Group