Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
eventmachine
Search
Thiago Barreto
October 05, 2012
Programming
96
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
eventmachine
apresentação sobre event machine no tech talk da @_nohup
Thiago Barreto
October 05, 2012
Other Decks in Programming
See All in Programming
UPDATE をやめる — EF Core でマスタをバージョン管理する
panda728
PRO
0
1.2k
iOS 27でニュースアプリはどう変わる!? 〜日経電子版の新機能対応と、開発事例から〜
lynnswap
7
13k
AIで開発が速くなった先で、開発チームは何を目指すか
shihochan
0
1.3k
Apple Intelligence を用いた個人情報誤送信防止、及びユーザーリクエスト体験の改善について
yukiny
0
350
最近”作らせてる” ローカルAIアプリの話
akit37
0
470
Augmenting AI with the Power of Jakarta EE
ivargrimstad
0
190
IBM Bob Dojo #1 仕様駆動開発入門
oniak3ibm
PRO
0
390
Railsのためのパスキー実践入門 〜マルチテナントSaaSでの意思決定〜
utakaha
2
560
パスワード再設定メールのURLについて知っておこう
uyuki234
0
160
コーディング自動化の次へ。人の介入をゼロにするファクトリーとサポートAIによる実践
timakin
5
3.6k
3回つくってわかった、 定期実行ジョブ基盤の本質情報
takai
0
470
Verilogで学ぶCPU自作入門
uyuki234
8
4.1k
Featured
See All Featured
"I'm Feeling Lucky" - Building Great Search Experiences for Today's Users (#IAC19)
danielanewman
230
23k
Stop Working from a Prison Cell
hatefulcrawdad
274
21k
Thoughts on Productivity
jonyablonski
76
5.4k
AI in Enterprises - Java and Open Source to the Rescue
ivargrimstad
0
1.5k
The browser strikes back
jonoalderson
0
1.8k
Joys of Absence: A Defence of Solitary Play
codingconduct
1
550
Navigating Team Friction
lara
192
16k
More Than Pixels: Becoming A User Experience Designer
marktimemedia
3
560
sira's awesome portfolio website redesign presentation
elsirapls
0
460
How to audit for AI Accessibility on your Front & Back End
davetheseo
0
600
B2B Lead Gen: Tactics, Traps & Triumph
marketingsoph
1
280
WENDY [Excerpt]
tessaabrams
14
40k
Transcript
eventmachine thiago barreto @thiagobc 5.10.2012
"It's time for web servers to handle ten thousand clients
simultaneously, don't you think? After all, the web is a big place now." http://www.kegel.com/c10k.html the c10k problem
padrão reactor "The reactor design pattern is an event handling
pattern for handling service requests delivered concurrently to a service handler by one or more inputs." en.wikipedia.org/wiki/Reactor_pattern
pra facilitar nodejs para ruby
huumm... eventos em aplicações ruby
huumm... i/o não-bloqueante em ruby
i/o bloqueante?
i/o não-bloqueante
docs eventmachine.rubyforge.org github.com/eventmachine/eventmachine
EM EM.run &block EM.stop
EM::Connection EM.start_server(ip, port, klass) EM.connect(ip, port, klass) post_init unbind receive_data(data)
threads: deferrables EM.defer &block include EM::Deferrable EM::Queue EM::Channel
EM::Queue queue = EM::Queue.new queue.push(item) queue.pop { |item| puts item
}
EM::Channel c = EM::Channel c.subscribe { |message| puts message }
c << "nohup"
mostre-me o código
ruby 1.9 fibers EM.synchrony
rails https://github.com/igrigorik/async-rails
servidores goliath thin unicorn
testes https://github.com/tmm1/em-spec
performance do hello world (req/s) rack : goliath : node
: eventmachine : 423 2125 6084 8814 speakerdeck.com/u/andrew/p/em-vs-node?slide=21
encurtador de urls (req/s) goliath : node : eventmachine :
1048 3660 7943 speakerdeck.com/u/andrew/p/em-vs-node?slide=26
performance (req/s) eventmachine 1 : node 1 : eventmachine 2
: node 2 : 6229,2 5195,2 9701,9 6227,7 tui8.com/2012/02/11/eventmachine-vs-node-js-performance/
por que node? em node tudo é não-bloqueante. sempre! em
eventmachine é preciso usar bibliotecas não-bloqueantes e preparar seu código para ser não-bloqueante
?
obrigado! @thiagobc