Event machine
Upcoming SlideShare
Loading in...5
×
 

Event machine

on

  • 1,213 views

 

Statistics

Views

Total Views
1,213
Views on SlideShare
1,213
Embed Views
0

Actions

Likes
2
Downloads
16
Comments
0

0 Embeds 0

No embeds

Accessibility

Categories

Upload Details

Uploaded via as Apple Keynote

Usage Rights

© All Rights Reserved

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Processing…
Post Comment
Edit your comment
  • \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

Event machine Event machine Presentation Transcript

  • Event Machine Ricardo Almeida @almeidaricardohttps://github.com/eventmachine/eventmachine
  • PostRank Tools • Mysql, Ruby (API), Rails, Sinatra, Phyton, Java, JRuby, EC2, Nagios, Ganglia, Solr • Eventmachine, RabbitMQ • From XMPP to AMQP • Cassandra, Goliathhttp://webpulp.tv/post/4184040219/scaling-postrank-using-ruby-and-eventmachine-with-ilya
  • Ilya Grigorik
  • Event Machine• Fast, simple event-processing library for Ruby programs• Event-driven I/O• Reactor pattern
  • Designed to• Extremely high scalability, performance and stability• An API that eliminates the complexities of high- performance threaded network programming
  • Social Core• Escalabilidade• Disponibilidade - Todos requests devem ser respondidos• Consistência
  • Architectures Job ManagerGET / POST Queue Server Event Process
  • 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)
  • EM-Tools• https://github.com/eventmachine/eventmachine/wiki• https://github.com/igrigorik/em-http-request• https://github.com/igrigorik/em-synchrony• https://github.com/postrank-labs/goliath
  • Benchmarks• ApacheBench,Version 2.3• Autoperf (httperf)
  • Provas!!
  • Sleep Select (1 sec)• Tools: • ApacheBench • Rails 3.1.0.rc6 + Ruby 1.9.2-head + Mysql + webrick https://gist.github.com/1166610
  • Sleep Select (1 sec) • ab -c 10 -n 10 http://localhost:3000/people/wait • Time taken for tests:   11.255 secondshttps://gist.github.com/1166610
  • 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
  • Sleep Select (1 sec) • ab -c 10 -n 10 http://localhost:3000/people/wait • Time taken for tests:   2.371 secondshttps://gist.github.com/1166610
  • Goliath• Heartbeat• Assync Upload• Routes• Validations
  • 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
  • Goliath +ActiveRecord
  • Sleep Select (1 sec) • ab -c 10 -n 10 http://0.0.0.0:9000/wait?format=json • Time taken for tests:   2.198 secondshttps://gist.github.com/1166610
  • HTTP assinc Req/Resp no MongoDB• Tools: • ApacheBench • Mysql • Ruby 1.9.2-head + EventMachine + Goliath + MongoDB
  • HTTP assincReq/Resp no MongoDB• ab -c 10 -n 10 http://0.0.0.0:9000/teste?format=json• Time taken for tests:   0.209 seconds
  • HTTP assincReq/Resp no MongoDB• ab -c 50 -n 50 http://0.0.0.0:9000/teste?format=json• Time taken for tests:   1.105 seconds
  • EM + RabbitMQ
  • EM + RabbitMQ
  • Domínios• AAPG • Facebook• Anotations • Twitter• Activity (New) • Google+
  • http://www.slideshare.net/hungryblank/distributed-and-concurrent-programming-with-rabbitmq-and-eventmachine-rails-underground-2009
  • http://www.slideshare.net/hungryblank/distributed-and-concurrent-programming-with-rabbitmq-and-eventmachine-rails-underground-2009
  • http://www.slideshare.net/hungryblank/distributed-and-concurrent-programming-with-rabbitmq-and-eventmachine-rails-underground-2009
  • SPDYhttp://www.igvita.com/2011/04/07/life-beyond-http-11-googles-spdy/
  • Obrigado! Ricardo Almeida @almeidaricardo