Showing posts with label gadget. Show all posts
Showing posts with label gadget. Show all posts

Wednesday, July 1, 2009

Notes from Seth Covitz's talk on Wave at Google Technology User Group

Some notes from Seth Covitz's Wave talk tonight.

  • Documents are used for content (blips) and data (data documents)
  • Documents contains xml and annotations
  • Annotation can specify range. Avoiding xml’s nesting problem
  • Documents are stored as a series of deltas
  • Delta is xml format too.
  • Different clients will have to take the documents and render it the same way.
  • Even if operations are applied in different order, they will still result in same data (operational transformation research)

For wave gadgets:

You may not want to update the gadget ui when user interact with it, you should just generate a state change, then wait for the state callback to change ui.

Seth demoed a +1 gadget. He also demoed a wave gadget being embedded on igoogle using embed API.

Wave is indexed in realtime. There is indexer watching change and update index for your search.

Hook extensions

  • Extending the google wave client
    • Keyboard action, etc

Robot architecture

  • too concentrated on listening. Didn't copy things down.

Monday, June 15, 2009

Google Wave and Race Condition

Character-level protocol

Google wave is the new platform for real-time communication that allows both parties to edit the same wavlet (you can think of wavelet as conversation or document). If you are a software developer, you might be thinking about how Wave is going to deal with race condition. I just found a good video from a Google engineer David Wang that might help clarify how wave can avoid race condition on protocol level when both sides are transmitting changes. Bascially, the protocol will specify the changes at the character level.

Race condition on Wave Gadget
That said, it seems that Wave Gadget may run into race condition.
If one participant write "gamestate"=1 into wave gadget state and the other party write "gamestate"=5. Then whoever writes later will overwrite the other's change.

To make it more concrete:
Let's say that both party check state to see if a host for the game is selected. If not, claim to be host and save it to state.
  1. party1 calls wave.getState() to and sees that "gamehost" property is absent. So gamehost is not selected.
  2. party2 calls wave.getState() to and sees that "gamehost" property is absent. So gamehost is not selected.
  3. party1 go ahead and claim to be gamehost and write the state "gamehost=party1" (by calling wave.getState().submitDelta())
  4. party2 go ahead and claim to be gamehost and write the state "gamehost=party2"
  5. Now both side think they are the host. Whoever writes last will overwrite the other side's state.
Hopefully there will be better control about race condition in Wave Gadget later.

Thursday, June 4, 2009

Google Wave Actionscript API

I have started creating an Actionscript library for Google Wave Gadget API. If everything goes as planned, one should be able to create gadgets that contain wave-enabled Flex/Flash using this library.
It is hosted at http://code.google.com/p/wave-as-client
It is not yet in any type of working version as it is not tested.