More Related Content Similar to Event machine (20) More from almeidaricardo (7) Event machine1. Event Machine
Ricardo Almeida
@almeidaricardo
https://github.com/eventmachine/eventmachine
3. PostRank Tools
• Mysql, Ruby (API), Rails, Sinatra, Phyton,
Java, JRuby, EC2, Nagios, Ganglia, Solr
• Eventmachine, RabbitMQ
• From XMPP to AMQP
• Cassandra, Goliath
http://webpulp.tv/post/4184040219/scaling-postrank-using-ruby-and-eventmachine-with-ilya
7. Event Machine
• Fast, simple event-processing library for Ruby
programs
• Event-driven I/O
• Reactor pattern
8. Designed to
• Extremely high scalability, performance and stability
• An API that eliminates the complexities of high-
performance threaded network programming
11. Architectures
Job Manager
GET / POST Queue
Server Event
Process
12. Tools
• Rails 3.1.0.rc6
• Ruby 1.9.2-head
• Event-Machine
• Thin
• Goliath
• Mysql (gem mysql2 v 0.3.6)
• MongoDB
• RabbitMQ (AMQP)
16. Sleep Select (1 sec)
• Tools:
• ApacheBench
• Rails 3.1.0.rc6 + Ruby 1.9.2-head + Mysql +
webrick
https://gist.github.com/1166610
17. Sleep Select (1 sec)
• ab -c 10 -n 10 'http://localhost:3000/people/wait'
• Time taken for tests: 11.255 seconds
https://gist.github.com/1166610
18. Sleep Select (1 sec)
• Tools: Assync Rails
• ApacheBench
• webrick
• Rails 3.1.0.rc6 + Ruby 1.9.2-head + Mysql + Thin
+ EventMachine
https://gist.github.com/1166610
19. Sleep Select (1 sec)
• ab -c 10 -n 10 'http://localhost:3000/people/wait'
• Time taken for tests: 2.371 seconds
https://gist.github.com/1166610
20. Goliath
• Heartbeat
• Assync Upload
• Routes
• Validations
21. Sleep Select (1 sec)
• Tools:
• ApacheBench
• Rails 3.1.0.rc6 + Thin
• Ruby 1.9.2-head + EventMachine + Mysql +
Goliath
https://gist.github.com/1166462
23. Sleep Select (1 sec)
• ab -c 10 -n 10 'http://0.0.0.0:9000/wait?format=json'
• Time taken for tests: 2.198 seconds
https://gist.github.com/1166610
24. HTTP assinc
Req/Resp no MongoDB
• Tools:
• ApacheBench
• Mysql
• Ruby 1.9.2-head + EventMachine + Goliath +
MongoDB
25. HTTP assinc
Req/Resp no MongoDB
• ab -c 10 -n 10 'http://0.0.0.0:9000/teste?format=json'
• Time taken for tests: 0.209 seconds
26. HTTP assinc
Req/Resp no MongoDB
• ab -c 50 -n 50 'http://0.0.0.0:9000/teste?format=json'
• Time taken for tests: 1.105 seconds
29. Domínios
• AAPG • Facebook
• Anotations • Twitter
• Activity (New) • Google+
Editor's Notes \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n