Social Software for Robots

11,693 views

Published on

How to use Jabber to build web APIs that provide rich real-time feedback to consumers, without killing your service.

Published in: Technology
4 Comments
23 Likes
Statistics
Notes
No Downloads
Views
Total views
11,693
On SlideShare
0
From Embeds
0
Number of Embeds
88
Actions
Shares
0
Downloads
333
Comments
4
Likes
23
Embeds 0
No embeds

No notes for slide

Social Software for Robots

  1. Social Software for Robots XTech 2007
  2. Kellan Elliott-McCrea
  3. Flickr
  4. Blaine Cook
  5. Twitter
  6. For Robots?
  7. Social Software
  8. Social Software is •social software is made of people •people talking to people? •people talking to computers, talking to people.
  9. Software to collect and share individuals’ actions in a social context.
  10. web apis
  11. Server no. bored distracted ? t re ye e the are w no. bored distracted ? t re ye e the are w no. bored distracted ? t re ye e the are w Client
  12. Client bored bored bored bored are we there yet? are we there yet? are we there yet? are we there yet? no. no. no. no. Web ? ? ? ? no. no. no. no. DB distracted distracted distracted distracted
  13. Client bored bored bored bored are we there yet? are we there yet? are we there yet? are we there yet? no. no. no. no. Web ? ? ? ? no. no. no. no. DB distracted distracted distracted distracted
  14. Server we’re there arrival let me know re e when we’re th Client
  15. PASSING NOTES YOU DID THIS WHEN YOU WERE EIGHT. IT’LL BE OKAY.
  16. Social Software For Robots
  17. Robots do it with Message Passing
  18. Where it Works. •real time data •historical and static content - not so much. •wire-level data •interactive searches - (no db interaction) not so much •shift from access-past to notify-future •very long running queries
  19. New Patterns (how else can you use it?)
  20. tim e Realtime Craigslist
  21. Spontaneity
  22. Flickr TMI Addiction
  23. Fishing •Put a net out, and get notified when you catch something. •When real-time data is more important that knowing in advance or researching the future. •Who’s going for lunch NOW?
  24. <message from=”driver@local” to=”car@local”> PEN DOWN FORWARD 40 RIGHT 65 LEFT 25 FORWARD 40 </message>
  25. Jabber
  26. What’s in it for me? •flexible & extensible •asynchronous, low latency (realtime) •delegated •security & identity baked in •presence •standardized
  27. It’s Just XML <message to=quot;horatio@denmarkquot; from=quot;hamlet@denmarkquot;> <body>Angels and Ministers of Grace, defend us!</body> <foo xmlns=quot;http://www.foo.org/quot;> <bar>ab<fb/>cd</bar> </foo> </message>
  28. Asynchronous <message from=quot;xena@gmail.comquot; to=quot;sparql@w3c.orgquot;>meow!</message> <message from=quot;sparql@w3c.orgquot; to= quot;xena@gmail.comquot;>meow!</message>
  29. Secure + Identity •dialback server authentication (dns) •s2s encrypted •c2s encrypted •from address set by server (no spoofing!) •globally unique jids (like email)
  30. Delegated Delivery
  31. I CAN HAS CALLBACKS
  32. Standardised
  33. Open Sourcerrific •ejabberd •ruby •djabberd •php •wildfire •java •lmnop-jabberd •perl •twisted suite •python •firefox
  34. Presence! •Ralph is going to talk about this in the next talk. Y’all stick around now, y’hear?
  35. Decentralized, But not all the way. •Smarts on the Edge-1 is what you want for ubicomp / device saturated world.
  36. that was a lot. •async, real-time. •presence •extensible •decentralized, but not p2p* •secure w/identity •delegated •i can has callbacks! •standardized
  37. Robots
  38. Twitter. You use it every day. It’s a Social Robot.
  39. Use Jabber::Simple
  40. require 'xmpp4r-simple' jabber = Jabber::Simple.new (quot;flickrit@gmail.comquot;, quot;passwordquot;) send your tags to flickrit@gmail.com! wifi is “icanhasinternet”
  41. jabber.deliver(quot;flickrviz@laughingmeme.orgquot;, quot;hey there.quot;) send your tags to flickrit@gmail.com! wifi is “icanhasinternet”
  42. jabber.received_messages do |message| puts message.body end send your tags to flickrit@gmail.com! wifi is “icanhasinternet”
  43. require 'xmpp4r-simple' CLIENT = Jabber::Simple.new(quot;flickrit@gmail.comquot;, quot;passwordquot;) def post_photo_update(message) CLIENT.deliver(quot;flickrviz@laughingmeme.orgquot;, message) end def request_flickr_photos(message) CLIENT.deliver(quot;flickrapi@gmail.comquot;, quot;#{message.from} wants to see photos of #{message.body}quot;) end loop do CLIENT.received_messages do |message| case message.from.strip.to_s when 'flickrapi@gmail.com': post_photo_update(message.body) else request_flickr_photos(message) end end end
  44. pretty send your tags to flickrit@gmail.com! wifi is “icanhasinternet”
  45. Photo Credits http://www.flickr.com/photos/jayjizzle/205165885/ http://www.flickr.com/photos/heather/384134566/ http://flickr.com/photos/kevinsteele/473590084/ http://www.flickr.com/photos/exfordy/123370328/ http://flickr.com/photos/pingnews/426262117/
  46. thanks! especially to tom from stamen. he totally rocks.

×