<?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>Federico Feroldi's blog &#187; XMPP</title>
	<atom:link href="http://www.pixzone.com/blog/category/xmpp/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.pixzone.com/blog</link>
	<description>by Federico Feroldi</description>
	<lastBuildDate>Sat, 13 Jun 2009 20:00:38 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
		<item>
		<title>Realtime shared Google Map screencast</title>
		<link>http://www.pixzone.com/blog/233/realtime-shared-google-map-screencast/</link>
		<comments>http://www.pixzone.com/blog/233/realtime-shared-google-map-screencast/#comments</comments>
		<pubDate>Thu, 28 Jun 2007 17:32:13 +0000</pubDate>
		<dc:creator>Federico Feroldi</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[XMPP]]></category>

		<guid isPermaLink="false">http://www.pixzone.com/blog/233/realtime-shared-google-map-screencast/</guid>
		<description><![CDATA[Here&#8217;s a short screencast of a quick demo of the realtime shared Google Map based on XMPP4MOZ that I&#8217;m working on. The demo shows some of the current features: Users can connect to the agent and the map updates with the current location and zoom level. The agent keeps the status of map, landmarks and [...]]]></description>
			<content:encoded><![CDATA[<p>Here&#8217;s a short screencast of a quick demo of the <a href="http://www.pixzone.com/blog/231/realtime-google-map-sharing-through-xmpp-messages/">realtime shared Google Map based on XMPP4MOZ</a> that I&#8217;m working on.</p>
<p><object width="425" height="350"><param name="movie" value="http://www.youtube.com/v/aXnUw4T4t5Q"></param> <embed src="http://www.youtube.com/v/aXnUw4T4t5Q" type="application/x-shockwave-flash" width="425" height="350"></embed></object></p>
<p>The demo shows some of the current features:</p>
<ul>
<li>Users can connect to the agent and the map updates with the current location and zoom level. The agent keeps the status of map, landmarks and chat so if a user connects after other users have updated the map he can see the last map status. This also happens if all the users disconnects, the agent keeps the map so when they connect again they can start from what they leaved.</li>
<li>Synchronization features. Users can move and zoom the map and other see that actions in realtime. Users can chat toghether and they can also add markers on the map and drag them around. All the user&#8217;s maps updates in realtime.</li>
<li>The current application is very modular, the core abstracts the comunication with the agent and manages the creation and initialization of the modules so it&#8217;s very easy to create new modules and add functionality.
<li>
<li>The current application consists of <em>application core</em>, <em>movement and zoom sync module</em>, a <em>chat module</em>, <em>landmark module</em>.</li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://www.pixzone.com/blog/233/realtime-shared-google-map-screencast/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Realtime Google Map sharing through XMPP messages</title>
		<link>http://www.pixzone.com/blog/231/realtime-google-map-sharing-through-xmpp-messages/</link>
		<comments>http://www.pixzone.com/blog/231/realtime-google-map-sharing-through-xmpp-messages/#comments</comments>
		<pubDate>Mon, 25 Jun 2007 10:49:02 +0000</pubDate>
		<dc:creator>Federico Feroldi</dc:creator>
				<category><![CDATA[Ruby]]></category>
		<category><![CDATA[University]]></category>
		<category><![CDATA[XMPP]]></category>

		<guid isPermaLink="false">http://www.pixzone.com/blog/231/realtime-google-map-sharing-through-xmpp-messages/</guid>
		<description><![CDATA[Building a realtime shared map to plan travels with your friends. The architecture is based on Javascript, Ruby, XMPP and XMPP4MOZ.]]></description>
			<content:encoded><![CDATA[<p>For a <a href="http://www.laureaonline.polimi.it/">university</a> exam (<a href="http://www.laureaonline.polimi.it/corsi/corso_3g_uomo-macchina.html">Human Computer Interaction</a>) I&#8217;m developing a realtime shared map that you can use to plan a travel with your friends in realtime while you chat with them.</p>
<h2>The user interface</h2>
<p>The map will be interactive and it will have some shared widgets that will provide the user with:</p>
<ul>
<li>user roster (who&#8217;s online)</li>
<li>chat window</li>
<li>shared landmarks that users can put and move on the map</li>
<li>shared post-it notes associated with landmarks</li>
<li>flickr widget that can be moved across the page and will show the pictures related to that place</li>
<li>a shared wiki widget where you can put notes, drag landmarks to store interesting places, drag pictures from the flickr widget</li>
</ul>
<p>All these widgets are shared across the user, their position and their content gets replicated on the browsers in realtime and every user can interact and change the information.</p>
<h2>The architecture</h2>
<p>The application logic is composed of two entities: the <strong>map application</strong> and the <strong>agent application</strong>.</p>
<h3>The map application</h3>
<p>The <strong>map application</strong> will run completely on the user&#8217;s browser, his responsibilities are:</p>
<ul>
<li>Manage the interface (the map and the widgets) and the interaction with the user</li>
<li>Forward the interaction events to the <strong>agent application</strong></li>
<li>Update the interface based on the incoming events from the <strong>agent application</strong> (i.e. when other users interact with the map)</li>
</ul>
<h3>The agent application</h3>
<p>The <strong>agent application</strong> can run anywhere as long at it can have an <a href="http://www.xmpp.org/">XMPP</a> link, his responsibilities are:</p>
<ul>
<li>Keep a consistent state of the map and the widgets (map position, zoom level, landmarks positions, wiki data, etc&#8230;)</li>
<li>Update the map status based on the messages coming from the users</li>
<li>Forward the map updates to the users</li>
</ul>
<h2>Technologies involved</h2>
<h3>Frontend</h3>
<p>The user interface is created from HTML and javascript is used to manage the page updates and the interaction events.<br />
A google map is used as the main page widget and other small windows are created on the map and can be dragged over the page by the user.</p>
<h3>Messaging infrastructure</h3>
<p>The comunication link between the <strong>map application</strong> and the <strong>agent application</strong> is created by using the <a href="http://dev.hyperstruct.net/xmpp4moz">XMPP4MOZ</a> extension for Firefox.<br />
The <strong>map application</strong> encapsulates <a href="http://json.org/">JSON</a> objects describing map events into <a href="http://www.xmpp.org/">XMPP</a> messages that are sent to the <strong>agent application</strong> in realtime.<br />
The <strong>map application</strong> also receives <a href="http://json.org/">JSON</a> objects coming from the <strong>agent application</strong> describing map updates.<br />
Any <a href="http://www.xmpp.org/">XMPP</a> (<a href="http://www.jabber.org/">Jabber</a>) account can be used for users and the agent. I used Google Mail accounts that can be used with the very fast and reliable <a href="http://code.google.com/apis/talk/open_communications.html">Google Talk XMPP</a> server.</p>
<h3>Backend</h3>
<p>The backend application (<strong>agent application</strong>) is made in <a href="http://www.ruby-lang.org/">Ruby</a> using the <a href="http://home.gna.org/xmpp4r/">XMPP4R</a> to manage the <a href="http://www.xmpp.org/">XMPP</a> communication link and the <a href="http://json.rubyforge.org/">Ruby JSON library</a> to encode and decode <a href="http://json.org/">JSON</a> objects.<br />
The backend will keep the status of the map and the widgets so everytime a new user joins the frontend can show the current status of the map.</p>
<h2>The prototype</h2>
<p>I was able to hack a quick prototype of the frontend and the backend on Friday afternoon.<br />
Everything is working fine so far.<br />
I was able to run the <strong>agent application</strong> and <strong>two users</strong> on the <strong>map application</strong> each on one different laptop (yeah I have three laptops&#8230; actually four <img src='http://www.pixzone.com/blog/wp-includes/images/smilies/icon_biggrin.gif' alt=':D' class='wp-smiley' /> ) and watching map moving in realtime from one laptop to the other.<br />
I also had time to create a simple widget that enables a user to put landmarks on the map that can be dragged around by any user. The agent keeps the position of the map and of each landmark so when a new user logs in he will see the landmarks created by other users and he will be able to interact with them.</p>
<h2>What&#8217;s next</h2>
<p>I want to refactor a bit the frontend code to separate the core of the application that manages the messaging with the backend with the widgets that let the user interact with the map. Ideally you should be able to plug functionality into the core application by including self contained modules.<br />
I&#8217;ll plan to share some of the code once I feel it&#8217;s kinda useful&#8230; <img src='http://www.pixzone.com/blog/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://www.pixzone.com/blog/231/realtime-google-map-sharing-through-xmpp-messages/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
	</channel>
</rss>

<!-- Dynamic Page Served (once) in 0.340 seconds -->
