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
Erlang u praksi
Search
Saša Jurić
November 24, 2012
Programming
1
380
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
180
Simplifying systems with Elixir - Belgrade
sasajuric
3
450
Simplifying systems with Elixir
sasajuric
2
570
Metagrokking Elixir
sasajuric
4
290
Solid Ground
sasajuric
15
1.2k
Solid Ground
sasajuric
3
880
Elixir - valentine edition
sasajuric
0
130
What's the fuss about Phoenix?
sasajuric
2
1.1k
Phoenix
sasajuric
1
230
Other Decks in Programming
See All in Programming
コードとあなたと私の距離 / The Distance Between Code, You, and I
hiro_y
0
180
ソフトウェア設計の実践的な考え方
masuda220
PRO
4
610
品質ワークショップをやってみた
nealle
0
550
釣り地図SNSにおける有料機能の実装
nokonoko1203
0
170
なぜあの開発者はDevRelに伴走し続けるのか / Why Does That Developer Keep Running Alongside DevRel?
nrslib
3
410
CSC509 Lecture 05
javiergs
PRO
0
300
詳しくない分野でのVibe Codingで困ったことと学び/vibe-coding-in-unfamiliar-area
shibayu36
3
5.1k
Six and a half ridiculous things to do with Quarkus
hollycummins
0
180
Introduce Hono CLI
yusukebe
6
2.8k
「ちょっと古いから」って避けてた技術書、今だからこそ読もう
mottyzzz
11
6.9k
バッチ処理を「状態の記録」から「事実の記録」へ
panda728
PRO
0
170
大規模アプリのDIフレームワーク刷新戦略 ~過去最大規模の並行開発を止めずにアプリ全体に導入するまで~
mot_techtalk
1
470
Featured
See All Featured
How to Think Like a Performance Engineer
csswizardry
27
2.1k
YesSQL, Process and Tooling at Scale
rocio
173
14k
Statistics for Hackers
jakevdp
799
220k
The Invisible Side of Design
smashingmag
302
51k
A better future with KSS
kneath
239
18k
Code Review Best Practice
trishagee
72
19k
StorybookのUI Testing Handbookを読んだ
zakiyama
31
6.2k
Templates, Plugins, & Blocks: Oh My! Creating the theme that thinks of everything
marktimemedia
31
2.5k
Building Applications with DynamoDB
mza
96
6.7k
VelocityConf: Rendering Performance Case Studies
addyosmani
332
24k
jQuery: Nuts, Bolts and Bling
dougneiner
65
7.9k
The World Runs on Bad Software
bkeepers
PRO
72
11k
Transcript
Erlang u praksi
[email protected]
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