<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Xebia Blog &#187; Sonny Gill</title>
	<atom:link href="http://blog.xebia.com/author/sonnygill/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.xebia.com</link>
	<description>Software development done right!</description>
	<lastBuildDate>Wed, 01 Feb 2012 00:30:00 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>Developing with Google Wave</title>
		<link>http://blog.xebia.com/2009/06/08/developing-with-google-wave/</link>
		<comments>http://blog.xebia.com/2009/06/08/developing-with-google-wave/#comments</comments>
		<pubDate>Mon, 08 Jun 2009 10:58:02 +0000</pubDate>
		<dc:creator>Sonny Gill</dc:creator>
				<category><![CDATA[Java]]></category>
		<category><![CDATA[Web 2.0]]></category>
		<category><![CDATA[API]]></category>
		<category><![CDATA[Frameworks]]></category>
		<category><![CDATA[Google Wave]]></category>

	<!-- AutoMeta Start -->
	<category>robot</category>
	<category>wave</category>
	<category>wavepanel</category>
	<category>gadgets</category>
	<category>robots</category>
	<category>gadget</category>
	<category>embed</category>
	<category>blip</category>
	<category>robot</category>
	<category>wave</category>
	<category>wavepanel</category>
	<category>gadgets</category>
	<category>robots</category>
	<category>gadget</category>
	<category>embed</category>
	<category>blip</category>
	<!-- AutoMeta End -->
	
		<guid isPermaLink="false">http://blog.xebia.com/?p=1949</guid>
		<description><![CDATA[The last blog post, Understanding Google Wave, discussed the architecture and technical underpinnings of Google Wave. In this post, we will look at different ways of developing with Google Wave. There are three ways you can extend or use Google Wave in your applications. Embedding Wave You can embed a Wave into a web page [...]]]></description>
			<content:encoded><![CDATA[<p>The last blog post, <a href="http://blog.xebia.com/2009/06/08/understanding-google-wave/">Understanding Google Wave</a>, discussed the architecture and technical underpinnings of <strong>Google Wave</strong>. In this post, we will look at different ways of developing with Google Wave.<br />
<span id="more-1949"></span><br />
There are three ways you can extend or use Google Wave in your applications.</p>
<p><strong>Embedding Wave</strong></p>
<p>You can embed a Wave into a web page by adding some simple JavaScript code.<br />
The Wave Embed API provides the <a href="http://code.google.com/apis/wave/embed/guide.html#WavePanel">WavePanel</a> object which can hold a wave. You ask the WavePanel to use an HTML element on your web page to show a wave. The conversations on the wave will be visible in the WaveClient.</p>
<p>The steps to embed a wave on a web page are -</p>
<ol>
<li>
Load the Embed API JavaScript -</p>
<pre lang="JavaScript">
<script src="http://wave-api.appspot.com/public/embed.js" type="text/javascript"></script>
</pre>
</li>
<li>
Create an HTML element that will contain the embedded wave -</p>
<pre lang="html">
<div id="waveframe" style="width: 500px; height: 100%"></div>
</pre>
</li>
<li>
Initialize the WavePanel object -</p>
<pre lang="JavaScript">
	function initialize() {
	       var wavePanel = new WavePanel('http://wave.google.com/a/wavesandbox.com/');
	      	wavePanel.loadWave('wavesandbox.com!w' + waveID);
      		wavePanel.init(document.getElementById('waveframe'));
    	}
	...
	  <body onload="initialize()">
	...
</pre>
</li>
</ol>
<p>The wave is embedded in an iframe created inside the supplied HTML element.<br />
The argument passed to the WavePanel is the <em>Wave server instance</em>. This value is used to set up the URLs used in the iframe created. For the early developer access, it must be http://wave.google.com/a/wavesandbox.com/ (including the trailing slash).</p>
<p><strong>Extending Wave &#8211; Robots</strong></p>
<p>Robots are server side programs that can act as participants in a Wave. They can edit content, add users, extract content and post it to an external service thus acting as gateways between a Wave and an external service such as Twitter.<br />
A robot can respond to wave events such as wavelet_blip_created or wavelet_participants_changed. You can also specify a Cron schedule to ask the Wave to contact the robot at regular intervals.</p>
<p>You use a capabilities.xml file to specify what events a robot is interested in. An example from one of the samples is -</p>
<pre lang="xml">
<?xml version="1.0"?>
<w:robot xmlns:w="http://wave.google.com/extensions/robots/1.0">
     <w:capabilities>
          <w:capability name="wavelet_participants_changed"/>
      </w:capabilities>  
     <w:crons>
          <w:cron path="/_wave/robot/fetchupdate" timerinseconds="10" />
     </w:crons>
     <w:profile name="stocky" imageurl="/images/dj.jpg" profileurl="/_wave/profile.xml" />
</w:robot>
</pre>
<p>There are Python and Java libraries to help you write Robots. </p>
<p>In Java, you can extend <a href="http://wave-robot-java-client.googlecode.com/svn/trunk/doc/com/google/wave/api/AbstractRobotServlet.html">AbstractRobotServlet</a> class and implement <a href="http://wave-robot-java-client.googlecode.com/svn/trunk/doc/com/google/wave/api/AbstractRobotServlet.html#processEvents(com.google.wave.api.RobotMessageBundle)">processEvents(RobotMessageBundle events)</a> to create a wave robot. This class translates the incoming Wave events in the form of HTTP requests into Java method calls, and communicates the changes made back to the wave.</p>
<p>You interact with the wave by using objects provided by the <a href="http://wave-robot-java-client.googlecode.com/svn/trunk/doc/index.html">Wave Robot API</a>.<br />
The following lines of code add a new &#8220;blip&#8221; to a wave -</p>
<pre lang="Java">
		Wavelet wavelet = events.getWavelet();
            	Blip blip = wavelet.appendBlip();
            	TextView textView = blip.getDocument();
            	textView.append("Hello World!");
</pre>
<p>It seems that the only way to deploy a robot at the moment is to deploy it to Google App Engine. Then you can add the robot to a wave using its Wave ID, which is its App Engine application ID followed by @appspot.com. This should change in near future and allow you to deploy the robot to any URL.</p>
<p>See the <a href="http://code.google.com/apis/wave/extensions/robots/guide.html">Robots Tutorial</a> for a step by step guide.</p>
<p><strong>Extending Wave &#8211; Gadgets</strong></p>
<p>Gadgets are small programs that add functionality to the Google Wave client. They are written in JavaScript and HTML.<br />
Gadgets use the wave object defined in <a href="http://wave-api.appspot.com/public/wave.js">http://wave-api.appspot.com/public/wave.js</a> file to interact with the wave they are part of. Each gadget has a state object, which is a a map of key-value pairs. You can implement callbacks that are called by the wave whenever the gadget state or the list of participant changes.<br />
The HTML and JavaScript making up the gadget are packaged as an XML file, and can be hosted anywhere on the internet.<br />
See the Wave <a href="http://code.google.com/apis/wave/extensions/gadgets/guide.html">Gadgets tutorial</a> for example code for a gadget that allows you to run an auction in a wave.</p>
<p>
<strong>Resources</strong> -</p>
<p><a href="http://code.google.com/apis/wave/extensions/robots/guide.html">Google Wave Robots: Creating a Robot</a><br />
<a href="http://code.google.com/apis/wave/samples/index.html">Google Wave API samples</a><br />
<a href="http://code.google.com/apis/wave/extensions/gadgets/guide.html">Wave Gadgets Tutorial</a><br />
<a href="http://wave-robot-java-client.googlecode.com/svn/trunk/doc/index.html">Wave Robot API</a><br />
<a href="http://groups.google.com/group/google-wave-api">Google Wave API forum</a></p>
<div name="googleone_share_1" style="position:relative;z-index:5;float: right; margin-left: 10px;"><g:plusone size="small" count="1" href="http://blog.xebia.com/2009/06/08/developing-with-google-wave/"></g:plusone></div><p><a class="a2a_dd a2a_target addtoany_share_save" href="http://www.addtoany.com/share_save#url=http%3A%2F%2Fblog.xebia.com%2F2009%2F06%2F08%2Fdeveloping-with-google-wave%2F&amp;title=Developing%20with%20Google%20Wave" id="wpa2a_2"><img src="http://blog.xebia.com/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share"/></a></p>]]></content:encoded>
			<wfw:commentRss>http://blog.xebia.com/2009/06/08/developing-with-google-wave/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Understanding Google Wave</title>
		<link>http://blog.xebia.com/2009/06/08/understanding-google-wave/</link>
		<comments>http://blog.xebia.com/2009/06/08/understanding-google-wave/#comments</comments>
		<pubDate>Mon, 08 Jun 2009 09:51:42 +0000</pubDate>
		<dc:creator>Sonny Gill</dc:creator>
				<category><![CDATA[Tools]]></category>
		<category><![CDATA[Web 2.0]]></category>
		<category><![CDATA[Concurrency Control]]></category>
		<category><![CDATA[email]]></category>
		<category><![CDATA[Google]]></category>
		<category><![CDATA[Google Wave]]></category>

	<!-- AutoMeta Start -->
	<category></category>
	<!-- AutoMeta End -->
	
		<guid isPermaLink="false">http://blog.xebia.com/?p=1898</guid>
		<description><![CDATA[(This blog post gives an overview of the architecture and technical concepts in Google Wave. If you are interested in how to use Google Wave in your applications, see Developing with Google Wave) At Google I/O 2009, Google unveiled Wave. Wave is a new way of thinking about online conversations. Consider the following situations - You [...]]]></description>
			<content:encoded><![CDATA[<p>(This blog post gives an overview of the architecture and technical concepts in Google Wave. If you are interested in how to use <strong>Google Wave</strong> in your applications, see <a href="http://blog.xebia.com/2009/06/08/understanding-google-wave">Developing with Google Wave</a>)</p>
<p>At Google I/O 2009, Google unveiled Wave. Wave is a new way of thinking about online conversations.</p>
<p>Consider the following situations -</p>
<ol>
<li>
You write a blog post. Somebody comes around and posts a really insightful comment. Now, you or the comment author want to convert that comment into an independent blog post.
</li>
<li>
You have been having a long email discussion with a colleague. Now you would like to invite another colleague to the same. She will need to know the context of the discussion and how it evolved.
</li>
<li>
You email a few colleagues a draft of an article for review. They all email their comments back to you. A lot of them are suggesting the same changes without realizing that they have already been addressed.
</li>
</ol>
<p>With the tools we are using today such as email, blogs, IM etc., all of the above will require some kind of tedious copy &#8211; paste, and manual tracking of the changes being made.</p>
<p>Is there a better way?</p>
<p>The <strong>Google Wave</strong> model tries to provide a better way <span id="more-1898"></span> by doing away with the distinction between email, IM and other forms of online conversations. In this model, an email conversation, a blog post with its comments or an auction with its bids, are just online conversations with multiple participants. At the data model level, all you have is a wave, and you can look at it in many different ways.</p>
<p>Multiple participants can edit a Wave at the same time, and the wave client can show the changes in real time. The changes made to a Wave are stored as a series of operations. You can play the changes back, or revert the Wave to an earlier version. At the data model level, constituents of the Wave form a tree structure. You can take a particular node and spin it into an independent Wave.</p>
<p>Wave providers (servers) give out Wave accounts, and are responsible for sharing Waves with the clients, as well as with other Wave servers. Wave servers communicate with each other using <strong>Google Wave Federation Protocol</strong>, which is an extension of XMPP protocol. Wave servers use cryptographic signatures and certificates, in addition to transport level encryption provided by XMPP, to authenticate among themselves.</p>
<p><strong>Google Wave Operational Transformation</strong></p>
<p>A key concept at the center of Google Wave is <strong>Operational Transformation</strong> (OT). </p>
<div>
<div style="border: 2px; float:right; text-align:center; padding-left:20px;padding-bottom:20px">
<img class="size-full wp-image-1900" title="Operational Transformation" src="http://blog.xebia.com/wp-content/uploads/2009/06/basic_ot.png" alt="Operational Transformation" width="384" height="200"  style="float:right"/></p>
<hr/>
<small><br />
Credit: <a href="http://en.wikipedia.org/wiki/File:Basicot.png" title="Wikipedia" target="_blank">Wikipedia</a></small>
</div>
<p>Many participants can edit a Wave at the same time, and they can see each other&#8217;s changes as they are made. These attributes, concurrent modification and low latency updates, are implemented based on OT.<br />
OT is a framework for concurrency control. The document being edited is replicated at all sites. All editing actions are stored as operations that are propagated across all clients, local and remote. Concurrent edits are transformed by the server before being applied and the transformed operations are communicated to all clients. This is very similar to how version control systems like CVS manage merging of simultaneous edits of a document.
</p></div>
<p style="clear:both;">
From the <strong>Google Wave Operational Transformation</strong> whitepaper -</p>
<blockquote><p>
Wave OT modifies the basic theory of OT by requiring the client to wait for acknowledgment from the server before sending more operations. When a server acknowledges a client&#8217;s operation, it means the server has transformed the client&#8217;s operation, applied it to the server&#8217;s copy of the Wavelet and broadcasted the transformed operation to all other connected clients. Whilst the client is waiting for the acknowledgment, it caches operations produced locally and sends them in bulk later.</p></blockquote>
<p>For more technical details on these topics, see <a href="http://en.wikipedia.org/wiki/Operational_transformation">Operational transformation</a>, and <a href="http://www.waveprotocol.org/whitepapers/operational-transform">Google Wave Operational Transformation</a>.</p>
<p><strong>Google Wave Data Model</strong></p>
<p>A Wave is made up of Wavelets. Each wavelet has a unique id within its wave. The Wavelet contains a list of participants and a set of documents. A document in a wavelet has a unique id within its wavelet. It is composed of an XML document, and a set of annotations. Some of these annotations specify the styling of the text content of the document.<br />
Concurrency control and operational transformation are applied at the level of Wavelets. A particular wave user may only have access to a subset of the wavelets in that wave.</p>
<p>The state of a wavelet is defined entirely by an ordered sequence of operations that have been applied to it. Wave clients send these operations to the server to communicate changes to the underlying document, and the server propagates these operations (after a transformation, if required) to other clients and other servers participating in the wave.</p>
<p><strong>Resources &#8211; </strong><br />
<a href="http://www.waveprotocol.org/whitepapers/internal-client-server-protocol">Google Wave Data Model and Client-Server protocol</a><br />
<a href="http://www.waveprotocol.org/whitepapers/google-wave-architecture">Google Wave Federation Architecture</a><br />
<a href="http://en.wikipedia.org/wiki/Operational_transformation">Operational transformation</a><br />
<a href="http://groups.google.com/group/wave-protocol/">Wave Protocol forum</a><br />
<a href="http://googlewavedev.blogspot.com/">Google Wave Developer Blog</a></p>
<p>In the next blog post on this subject, we will look at different ways of <a href="http://blog.xebia.com/2009/06/08/developing-with-google-wave">developing with Google Wave</a>.</p>
<div name="googleone_share_1" style="position:relative;z-index:5;float: right; margin-left: 10px;"><g:plusone size="small" count="1" href="http://blog.xebia.com/2009/06/08/understanding-google-wave/"></g:plusone></div><p><a class="a2a_dd a2a_target addtoany_share_save" href="http://www.addtoany.com/share_save#url=http%3A%2F%2Fblog.xebia.com%2F2009%2F06%2F08%2Funderstanding-google-wave%2F&amp;title=Understanding%20Google%20Wave" id="wpa2a_4"><img src="http://blog.xebia.com/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share"/></a></p>]]></content:encoded>
			<wfw:commentRss>http://blog.xebia.com/2009/06/08/understanding-google-wave/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>
<!-- This Quick Cache file was built for (  blog.xebia.com/author/sonnygill/feed/ ) in 0.53297 seconds, on Feb 9th, 2012 at 4:42 pm UTC. -->
<!-- This Quick Cache file will automatically expire ( and be re-built automatically ) on Feb 9th, 2012 at 5:42 pm UTC -->
