Your SlideShare is downloading. ×
Having fun with jabber bots
Upcoming SlideShare
Loading in...5

Thanks for flagging this SlideShare!

Oops! An error has occurred.

Saving this for later? Get the SlideShare app to save on your phone or tablet. Read anywhere, anytime – even offline.
Text the download link to your phone
Standard text messaging rates apply

Having fun with jabber bots


Published on

Victor's presentation about xmpp and Jabber bots at Pycon Ireland 2010 …

Victor's presentation about xmpp and Jabber bots at Pycon Ireland 2010

Imagine the possibility of creating a real time channel, capable of notifying and interact, using a simple instant messaging application. Integrating such tool on your application could bring real value to you and customers. The main focus of this presentation is to show an easy way to create and use computer bots through the Python language, suggesting useful applications, and bring together some advanced considerations about security and natural language processing.

Learn how to create a bot using jabberBot (5 minute tutorial):
live example
How to make it useful?
Real time notification system
Integration with Yahoo, Exchange APIs
System administration
Getting serious

Alternative libraries
Language Processing

Published in: Technology

No Downloads
Total Views
On Slideshare
From Embeds
Number of Embeds
Embeds 0
No embeds

Report content
Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

No notes for slide


  • 1. Having Fun with Jabber Bots Victor Hugo Germano
  • 2. Why Jabber Bots? What kinda a crazy am I?
  • 3. It’s Fun!
  • 4. Maybe a glimpse of the future?
  • 5. Dynamic web Is not enough!
  • 6. Tired of Ctrl+R and F5
  • 7. We want websites like this!
  • 8. But during the game... Real time streamming... for sure!
  • 9. FLASH
  • 10. Would FLASH be the answer?
  • 11. No! At least is what most companies are saying
  • 12. “Big” Problem How to create a chat room? Or a chess game?
  • 13. Because Latency Matters Specially when developing and application
  • 14. client server Traditional Polling Often Problematic
  • 15. ? Any other options?
  • 16. Extensive Messaging and Presence Protocol Event-Driven XML oriented
  • 17. Stanzas Presence <presence from="">   <status>at #pyconIreland o/</status> </presence>
  • 18. Stanzas Message <message to=""      from=""      type="chat" >     <body>How u doing? ;) </body> </message>
  • 19. Stanzas IQ (Info Query) <iq type="get" id="an_id"      from=""      to="">     <query xmlns="jabber:iq:roster"/> </iq>
  • 20. client server Long Polling
  • 21.
  • 22. But XML sucks! xmppPy is your friend!
  • 23. xmppPy conn = xmpp.Client(‘’) conn.connect([server, port]) conn.auth(user, pwd) conn.send(Message( "","hello!")) conn.disconnect()
  • 24. First Example Using GTalkBot
  • 25. from gtalkbot import GTalkBot, botcommand class MyBot(GTalkBot): def __init__(self): super(MyBot,self).__init__('USER_ID','PWD') @botcommand def hello(self, mess, args): return “Hello World!” MyBot().run_client()
  • 26. $> python
  • 27. How about a real bot? Enough with the hello_world
  • 28. Demo Add a contact on your GTalk account
  • 29. Having fun! Show me the code!
  • 30. How can you use it?
  • 31. Real Time Web? Powered by XMPP
  • 32. BOSH Bidirectional-streams Over Synchronous HTTP
  • 33. Strophe.js When XMPP hits the web
  • 34. Strophe.js // Connecting var conn = new Strophe.Connection(URL) conn.connect( jid, password, callback ); // Creating stanzas var stanza = new Strophe.Builder( “message”, { “to”: “”, type:”chat” } );
  • 35. Who uses XMPP on the web?
  • 36. References Real Time Web with XMPP @ InfoQ
  • 37. Thank you! Use it! Share it! Remix it!