Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

Ruby e xmpp

779 views

Published on

Apresentação sobre Ruby e XMPP no Guru-SP

Published in: Technology
  • Be the first to comment

  • Be the first to like this

Ruby e xmpp

  1. 1. Ruby e XMPPPotHix (a.k.a Willian Molinari)
  2. 2. O motivo
  3. 3. Leela-serverhttps://github.com/locaweb/leela-server
  4. 4. Eventos via XMPP JSON FTW
  5. 5. Python?
  6. 6. Ruby!
  7. 7. Blatherhttp://adhearsion.github.com/blather/
  8. 8. Como organizar?
  9. 9. Daemonize
  10. 10. DaemonKitgithub.com/kennethkalmer/daemon-kit
  11. 11. Estrutura "Rails like"● bin● config● lib● libexec● log● public● script● tasks● tmp● spec
  12. 12. Algumas vantagens● Logs no syslog● Estrutura bem definida● script/console● Facilidades de start e stop● Environments
  13. 13. Ejabberd
  14. 14. Registrando usuárioejabberdctl --node ejabberd@mordor register sauron localhost asdfasdf
  15. 15. Resultado
  16. 16. Simples assim
  17. 17. MensagensMessage received: {"timestamp"=>1348190235, "name"=>"xenserver.hm6226.memory.main.used(%)", "value"=>72.0}Message received: {"timestamp"=>1348190235, "name"=>"xenserver.cpro5385.memory.main.used(%)", "value"=>65.0}Message received: {"timestamp"=>1348190235, "name"=>"xenserver.cprohostinglin0758.memory.main.used(%)", "value"=>92.0}Message received: {"timestamp"=>1348190235, "name"=>"xenserver.hm6224.memory.main.used(%)", "value"=>94.0}^C^C^C^Croot@cpro:~# tail /var/log/syslog -n800 | egrep "22:18:08" | wc -l69
  18. 18. Ruby 1.9.2 :(Memory leak zuado
  19. 19. Olha a situação... !!24GB 93% !!
  20. 20. Ruby 1.9.3 :) Vitorioso
  21. 21. Obrigado

×