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
310
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
2
530
Metagrokking Elixir
sasajuric
4
260
Solid Ground
sasajuric
15
1.1k
Solid Ground
sasajuric
3
680
Elixir - valentine edition
sasajuric
0
110
What's the fuss about Phoenix?
sasajuric
2
890
Phoenix
sasajuric
1
190
Other Decks in Programming
See All in Programming
10年以上続くプロダクトの フロントエンド刷新プロジェクトのふりかえり
yotahada3
2
350
WordPress(再)入門 - 基礎知識・環境編
oleindesign
1
140
Spring BootとKubernetesで実現する今どきのDevOps入門
xblood
0
390
Becoming an Android Librarian (Android World Wide 2023 Jan)
skydoves
2
220
Swift Observation
shiz
4
290
OSSから学んだPR Descriptionの書き方
fugakkbn
4
140
NGK2023S - OCaml最高! スマホ開発にも使えちゃう?!
haochenxie
0
120
Cloudflare WorkersでGoを動かすライブラリを作っている話
syumai
1
320
和暦を正しく扱うための暦の話
nagise
10
6.6k
Gradle build: The time is now
nonews
1
490
Remix + Cloudflare Pages + D1 で ポケモン SV のレンタルチームを検索できるアプリを作ってみた
kuroppe1819
4
1.4k
Rによる大規模データの処理
s_uryu
2
640
Featured
See All Featured
Become a Pro
speakerdeck
PRO
6
3.2k
Learning to Love Humans: Emotional Interface Design
aarron
263
38k
Dealing with People You Can't Stand - Big Design 2015
cassininazir
351
21k
Rails Girls Zürich Keynote
gr2m
87
12k
Stop Working from a Prison Cell
hatefulcrawdad
263
18k
Keith and Marios Guide to Fast Websites
keithpitt
407
21k
Java REST API Framework Comparison - PWX 2021
mraible
PRO
13
5.4k
Designing with Data
zakiwarfel
91
4.2k
Documentation Writing (for coders)
carmenintech
51
2.9k
GitHub's CSS Performance
jonrohan
1020
430k
Imperfection Machines: The Place of Print at Facebook
scottboms
254
12k
Building Adaptive Systems
keathley
27
1.3k
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