Home > java > Google wave java robot overview

Google wave java robot overview

appspotAs most of you are aware by now, developers can write java robots that can aid a conversation that happens in google wave. A conversation is a wavelet and each reply in this wavelet is called a blip. There are some ‘getting started’ tutorials available out there that are of great help. These links should help you

Official google wave guide
Google wave getting started – Sort of an abridged version of the official guide written by Vogella.

Grasping the overall picture of a java robot is a little difficult. This is because there are no flow or architecture diagrams (at least none that I know of) that show you the sequence of events. Given below is a diagram that does that. Assume that you wrote a java robot that is meant to edit blips in a wavelet. The robot should provide a profanity filter service which will delete objectionable words from the wave. This is how the series of events happen.

Google wave robot sequence of events:

google-wave-java-robot-arch

1. User logs in

2. Replies to a blip.

3. Our java robot is already deployed under a .appspot.com address. Its capability allows it to trigger an event that signals that a blip was created.

4. The triggered event is actually a HTTP request that goes out to the java robot servlet from google wave. The servlet then contacts wave using the wave client library API.

5. The blips in the wave are accessed using the client API. An event object return all the blips that were created.

6. The blip in question is identified and edited if needed.

7. Optionally you can include a “gadget” into your wave.  The robot can append a blip and add a gadget to it. A gadget is an XML file that houses, at times, javascript and HTML related content. The gadget can be hosted on any site. This is unlike the java robot, which at the time of this writing is only allowed to be hosted in google app engine (GAE). There are plans to allow developers to host it elsewhere on their own servers.

More on gadgets:

To get a feel for what a gadget is and how it can be used, check out the ISBN gadget and the gadget help files. Gadgets that are integrated with wave have a sense of state. This state is just a saved variable that is accessible by all users on that wave. This is like having a variable exposed to several threads at the same time. If you modify the state variables in the gadget, do so carefully since it is equivalent to accessing a non thread safe variable.

So there you go. The wave is still a developer’s playground and less of a lay man user’s tool. It will soon mature. If you happen to have a wave account, give the robots a try. Let others know what robot you made.




Categories: java Tags: , , ,
  1. October 24th, 2009 at 14:00 | #1

    Nice article.
    I have written an article how to write a simple hello world robot in Java :-
    http://anshu-manymoods.blogspot.com/2009/10/writing-google-wave-robots-using.html

  2. October 24th, 2009 at 14:32 | #2

    @Anshu Mishra
    I like the IntelliJ flavor you brought about in your tutorial. Should serve as a good reference for those that use that as their IDE.

  3. Kapil Neurgaonkar
    December 27th, 2009 at 18:29 | #3

    Very well presented. I liked the flow structure..

  4. May 10th, 2011 at 10:50 | #4

    Good information on Google wave java robot overview. I learnt so many thing from here. Thanks for sharing it.

  5. November 20th, 2011 at 04:27 | #5

    I simply wanted to thank you so much again. I am not sure the things I might have accomplished in the absence of the entire opinions provided by you concerning that situation. Certainly was a real depressing setting for me, but noticing the very skilled way you handled that took me to jump with happiness. Extremely happier for the support and thus wish you find out what a powerful job that you are putting in educating some other people through the use of your web site. Probably you haven’t encountered all of us.

  6. December 7th, 2011 at 20:44 | #6

    Great picture! We use it for our article “From google wave to noda.js”

  7. August 10th, 2012 at 03:20 | #7

    I am not sure where you are getting your info, but great topic. I needs to spend some time learning much more or understanding more. Thanks for wonderful info I was looking for this Google wave java robot overview – CertPal for my mission.

  1. December 22nd, 2011 at 01:39 | #1