Making dodgy robots with Google Wave

1,670 views

Published on

Making dodgy robots with Google Wave

Published in: Technology, Business
0 Comments
5 Likes
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total views
1,670
On SlideShare
0
From Embeds
0
Number of Embeds
51
Actions
Shares
0
Downloads
75
Comments
0
Likes
5
Embeds 0
No embeds

No notes for slide

Making dodgy robots with Google Wave

  1. 1. Making dodgy robots with Google Wave
  2. 2. What I reckon • Wave is truly interesting • Extending Wave will lead to interesting stuff • I’m not sure it needs it yet (will be most useful for niche applications for the “normals”)
  3. 3. What you can make • Robots (cloud), Gadgets (client), Embedded Waves (everywhere) • In Python, Java, Ruby... • A hangman game? mrspeaker@appspot.com
  4. 4. Making a robot • Set up the libraries, App Engine, & Eclipse • Target some Wave capabilities • Add the robot to every public Wave especially ones where people complain about annoying robots
  5. 5. Setup: details 1/2 • Get the client library: the main API - Blips, EventMessages, Text Views... • Set up your App Engine app: this will determine the participant in the Wave • Set up the Google plugin for eclipse
  6. 6. Setup details 2/2 • Create your Web App Project (which creates the structure) • Copy in the client API (and a couple of others) • Create the capabilities file
  7. 7. Capabilities <w:robot xmlns:w="http://wave.google.com/extensions/robots/ 1.0"> <w:capabilities> <w:capability name="WAVELET_PARTICIPANTS_CHANGED" content="true" /> <w:capability name="WAVELET_SELF_ADDED" content="true" /> </w:capabilities> <w:version>1</w:version> </w:robot>
  8. 8. Write code • Extend AbstractRobotServlet • Override processEvents • Which gets a RobotMessageBundle
  9. 9. To write stuff • Get the Wavelet: bundle.getWavelet() • Handle event: bundle.getEvents() • Make a blip: wavelet.appendBlip(); • Write to the TextView: getDocument().append( “lol! I’m on a wave” );
  10. 10. State • Really got me. Don’t use static variables! • Set data into the current Wavelet wavelet.setDataDocument( "currentGuess", hangman.getCurrentGuess() ); • Get data from the current Wavelet wavelet.getDataDocument("currentGuess")
  11. 11. Context • What information can you access? • You don’t get all info on every call - just a subset. • You can cache, but things might change.
  12. 12. Add the robot • Deploy to App Engine • Add as a contact • Add to a Wave • Annoy.
  13. 13. End of line. @mrspeaker mrspeaker.net

×