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
360
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
160
Simplifying systems with Elixir - Belgrade
sasajuric
3
440
Simplifying systems with Elixir
sasajuric
2
560
Metagrokking Elixir
sasajuric
4
280
Solid Ground
sasajuric
15
1.2k
Solid Ground
sasajuric
3
840
Elixir - valentine edition
sasajuric
0
120
What's the fuss about Phoenix?
sasajuric
2
1k
Phoenix
sasajuric
1
210
Other Decks in Programming
See All in Programming
見えないメモリを観測する: PHP 8.4 `pg_result_memory_size()` とSQL結果のメモリ管理
kentaroutakeda
0
310
fs2-io を試してたらバグを見つけて直した話
chencmd
0
230
StarlingMonkeyを触ってみた話 - 2024冬
syumai
3
270
今年のアップデートで振り返るCDKセキュリティのシフトレフト/2024-cdk-security-shift-left
tomoki10
0
200
nekko cloudにおけるProxmox VE利用事例
irumaru
3
420
今年一番支援させていただいたのは認証系サービスでした
satoshi256kbyte
1
250
Mermaid x AST x 生成AI = コードとドキュメントの完全同期への道
shibuyamizuho
0
160
テストコードのガイドライン 〜作成から運用まで〜
riku929hr
1
150
複雑な仕様に立ち向かうアーキテクチャ
myohei
0
170
命名をリントする
chiroruxx
1
390
テストケースの名前はどうつけるべきか?
orgachem
PRO
0
130
モバイルアプリにおける自動テストの導入戦略
ostk0069
0
110
Featured
See All Featured
The Psychology of Web Performance [Beyond Tellerrand 2023]
tammyeverts
45
2.2k
Faster Mobile Websites
deanohume
305
30k
GraphQLとの向き合い方2022年版
quramy
44
13k
Save Time (by Creating Custom Rails Generators)
garrettdimon
PRO
28
900
Documentation Writing (for coders)
carmenintech
66
4.5k
How to train your dragon (web standard)
notwaldorf
88
5.7k
Put a Button on it: Removing Barriers to Going Fast.
kastner
59
3.6k
The Cult of Friendly URLs
andyhume
78
6.1k
A better future with KSS
kneath
238
17k
Building Your Own Lightsaber
phodgson
103
6.1k
Templates, Plugins, & Blocks: Oh My! Creating the theme that thinks of everything
marktimemedia
28
2.1k
Music & Morning Musume
bryan
46
6.2k
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