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
340
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
150
Simplifying systems with Elixir - Belgrade
sasajuric
3
400
Simplifying systems with Elixir
sasajuric
2
540
Metagrokking Elixir
sasajuric
4
280
Solid Ground
sasajuric
15
1.1k
Solid Ground
sasajuric
3
770
Elixir - valentine edition
sasajuric
0
120
What's the fuss about Phoenix?
sasajuric
2
980
Phoenix
sasajuric
1
200
Other Decks in Programming
See All in Programming
Code Reviews
bkuhlmann
4
860
二郎系ラーメンのコールで学ぶ AST 解析
memory1994
PRO
7
1.6k
try!Swift Tokyo 2024 参加報告 LT
akidon0000
1
180
Prepare for Jakarta EE 11 - Performance and Developer Productivity
ivargrimstad
0
370
データアナリストが行うDatabricksを活用したETLの自動化事例
shinoa
0
250
#phpcon_odawara オープン・クローズドなテストフィクスチャを求めて / open closed test fixtures
77web
3
210
コードレビューで学ぶ!Kotlinオブジェクト指向デザインパターン
akkie76
2
170
1인 개발자로 행복하게 살기 - GDG 송도 헬로월드 2024
benjaminkim
1
5.6k
[SF Ruby, March 2024] Rails on Wasm
palkan
0
360
ゆるい個人開発のススメ
kuroppe1819
10
920
せっかくモデル図描くのなら、嬉しいことが多い方がいいよね!
kuboaki
1
3.1k
[技育CAMPアカデミア]アイディアを形に!【超入門】スマホアプリ開発〜リリースまでの流れをご紹介
teamlab
PRO
0
330
Featured
See All Featured
What's in a price? How to price your products and services
michaelherold
237
11k
Optimising Largest Contentful Paint
csswizardry
7
2.3k
Design and Strategy: How to Deal with People Who Don’t "Get" Design
morganepeng
115
18k
The Brand Is Dead. Long Live the Brand.
mthomps
48
28k
Teambox: Starting and Learning
jrom
128
8.4k
ピンチをチャンスに:未来をつくるプロダクトロードマップ #pmconf2020
aki_iinuma
75
41k
Side Projects
sachag
451
41k
Easily Structure & Communicate Ideas using Wireframe
afnizarnur
185
16k
Optimizing for Happiness
mojombo
369
69k
Making Projects Easy
brettharned
107
5.5k
Pencils Down: Stop Designing & Start Developing
hursman
116
11k
Facilitating Awesome Meetings
lara
40
5.6k
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