<?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; Ruby</title>
	<atom:link href="http://www.pixzone.com/blog/category/ruby/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>Un concentrato di cervelli italiani</title>
		<link>http://www.pixzone.com/blog/348/un-concentrato-di-cervelli-italiani/</link>
		<comments>http://www.pixzone.com/blog/348/un-concentrato-di-cervelli-italiani/#comments</comments>
		<pubDate>Mon, 17 Dec 2007 09:15:51 +0000</pubDate>
		<dc:creator>Federico Feroldi</dc:creator>
				<category><![CDATA[Italiano]]></category>
		<category><![CDATA[Nimboo]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[Ruby]]></category>

		<guid isPermaLink="false">http://www.pixzone.com/blog/348/un-concentrato-di-cervelli-italiani/</guid>
		<description><![CDATA[Diciamocelo, il panorama dei blog tecnici in Italia lasciava un po&#8217; a desiderare, nulla si avvicinava a siti come Ars Technica, Slashdot o Wired. Fino ad oggi. Da quel vulcano di Antonio Cangiano Ã¨ partito il progetto di creare un collettore di eccellenza per produrre articoli tecnici di altissima qualitÃ . Finalmente questo progetto Ã¨ giunto [...]]]></description>
			<content:encoded><![CDATA[<p>Diciamocelo, il panorama dei blog tecnici in Italia lasciava un po&#8217; a desiderare, nulla si avvicinava a siti come <a href="http://arstechnica.com/">Ars Technica</a>, <a href="http://www.slashdot.org/">Slashdot</a> o <a href="http://www.wired.com/">Wired</a>. Fino ad oggi.<br />
Da quel vulcano di <a href="http://antoniocangiano.com/">Antonio Cangiano</a> Ã¨ partito il progetto di creare un <a href="http://stacktrace.it/chi-siamo/">collettore di eccellenza</a> per produrre articoli tecnici di altissima qualitÃ .<br />
Finalmente questo progetto Ã¨ giunto alla luce, il suo nome Ã¨ <a href="http://stacktrace.it/">Stacktrace.it</a>, fateci un giro.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.pixzone.com/blog/348/un-concentrato-di-cervelli-italiani/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Hiring: Senior Frontend Developer for fast-paced Mobile Company at Mobango LTD</title>
		<link>http://www.pixzone.com/blog/344/hiring-senior-frontend-developer-for-fast-paced-mobile-company-at-mobango-ltd/</link>
		<comments>http://www.pixzone.com/blog/344/hiring-senior-frontend-developer-for-fast-paced-mobile-company-at-mobango-ltd/#comments</comments>
		<pubDate>Tue, 11 Dec 2007 11:31:46 +0000</pubDate>
		<dc:creator>Federico Feroldi</dc:creator>
				<category><![CDATA[Javascript]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[Ruby]]></category>
		<category><![CDATA[Ruby on Rails]]></category>

		<guid isPermaLink="false">http://www.pixzone.com/blog/344/hiring-senior-frontend-developer-for-fast-paced-mobile-company-at-mobango-ltd/</guid>
		<description><![CDATA[Mobango Ltd., with offices in London Milan and Munich, offers a unique integrated online and mobile community service, enabling users to share and explore user generated mobile content. Mobango has reached 2 Million members and we are now in a stage of accelerated growth, funded by leading international venture capitalists If you like working with [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.mobango.com">Mobango Ltd.</a>, with offices in London Milan and Munich, offers a unique integrated online and mobile community service, enabling users to share and explore user generated mobile content. Mobango has reached 2 Million members and we are now in a stage of accelerated growth, funded by leading international venture capitalists<br />
If you like working with the latest cutting edge internet and mobile languages and technology, being part of an ambitious and dynamic team, work in an international environment, do not miss this opportunity and send us your resume to <a href="mailto:jobs@mobango.com">jobs@mobango.com</a></p>
<p>We are currently undergoing rapid expansion and require a senior Frontend Developer to join our team.</p>
<p>Technical requirements:</p>
<p>- Deep knowledge of HTML/XHTML<br />
- Deep knowledge of CSS2/CSS3 and how they&#8217;re supported by browsers<br />
- Knowledge of Javascript<br />
- Exposure to Javascript frameworks (YUI, JQuery, Prototype)<br />
- Knowledge of Flash and ActionScript<br />
- Knowledge of mobile technologies (WML, XHTML-MP, CSS-MP) will be a big plus</p>
<p>The ideal candidate will be passionate about frontend development, enthusiastic about learning &#038; constant improvement and have a strong understanding of the Internet and emerging web technologies.</p>
<p>Working with our programming team, you will be developing &#038; modifying our online web and mobile site. You will need to familiarise yourself with the intricacies of our web and mobile site, along with being capable of implementing new web and mobile based interfaces.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.pixzone.com/blog/344/hiring-senior-frontend-developer-for-fast-paced-mobile-company-at-mobango-ltd/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Hiring: Junior PHP Developer for fast-paced Mobile Company at Mobango LTD</title>
		<link>http://www.pixzone.com/blog/343/hiring-junior-php-developer-for-fast-paced-mobile-company-at-mobango-ltd/</link>
		<comments>http://www.pixzone.com/blog/343/hiring-junior-php-developer-for-fast-paced-mobile-company-at-mobango-ltd/#comments</comments>
		<pubDate>Tue, 11 Dec 2007 11:28:24 +0000</pubDate>
		<dc:creator>Federico Feroldi</dc:creator>
				<category><![CDATA[Javascript]]></category>
		<category><![CDATA[Mobango]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[Ruby]]></category>
		<category><![CDATA[Ruby on Rails]]></category>

		<guid isPermaLink="false">http://www.pixzone.com/blog/343/hiring-junior-php-developer-for-fast-paced-mobile-company-at-mobango-ltd/</guid>
		<description><![CDATA[Mobango Ltd., with offices in London Milan and Munich, offers a unique integrated online and mobile community service, enabling users to share and explore user generated mobile content. Mobango has reached 2 Million members and we are now in a stage of accelerated growth, funded by leading international venture capitalists If you like working with [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.mobango.com">Mobango Ltd.</a>, with offices in London Milan and Munich, offers a unique integrated online and mobile community service, enabling users to share and explore user generated mobile content. Mobango has reached 2 Million members and we are now in a stage of accelerated growth, funded by leading international venture capitalists<br />
If you like working with the latest cutting edge internet and mobile languages and technology, being part of an ambitious and dynamic team, work in an international environment, do not miss this opportunity and send us your resume to <a href="mailto:jobs@mobango.com">jobs@mobango.com</a>.</p>
<p>We are currently undergoing rapid expansion and require a junior PHP Developer to join our team.</p>
<p>Technical requirements:</p>
<p>- PHP5 language (OO programming)<br />
- HTML knowledge<br />
- SQL knowledge<br />
- familiar with Subversion</p>
<p>The ideal candidate will be passionate about PHP development, enthusiastic about learning &#038; constant improvement and have a strong understanding of the Internet and emerging technologies.</p>
<p>Working with our programming team, you will be developing &#038; modifying our online software system. You will need to familiarise yourself with the intricacies of our custom-developed software, along with being capable of implementing new web and mobile based applications.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.pixzone.com/blog/343/hiring-junior-php-developer-for-fast-paced-mobile-company-at-mobango-ltd/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Hiring: Senior PHP Developer for fast-paced Mobile Company at Mobango LTD</title>
		<link>http://www.pixzone.com/blog/342/hiring-senior-php-developer-for-fast-paced-mobile-company-at-mobango-ltd/</link>
		<comments>http://www.pixzone.com/blog/342/hiring-senior-php-developer-for-fast-paced-mobile-company-at-mobango-ltd/#comments</comments>
		<pubDate>Tue, 11 Dec 2007 11:25:29 +0000</pubDate>
		<dc:creator>Federico Feroldi</dc:creator>
				<category><![CDATA[Mobango]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[Ruby]]></category>
		<category><![CDATA[Ruby on Rails]]></category>

		<guid isPermaLink="false">http://www.pixzone.com/blog/342/hiring-senior-php-developer-for-fast-paced-mobile-company-at-mobango-ltd/</guid>
		<description><![CDATA[Mobango Ltd., with offices in London Milan and Munich, offers a unique integrated online and mobile community service, enabling users to share and explore user generated mobile content. Mobango has reached 2 Million members. We are in a stage of accelerated growth, funded by a leading international venture capitalist. If you like working with the [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.mobango.com">Mobango Ltd.</a>, with offices in London Milan and Munich, offers a unique integrated online and mobile community service, enabling users to share and explore user generated mobile content. Mobango has reached 2 Million members. We are in a stage of accelerated growth, funded by a leading international venture capitalist. If you like working with the latest cutting edge internet and mobile languages and technology, being part of an ambitious and dynamic team, work in an international environment, do not miss this opportunity and send us your resume to <a href="mailto:jobs@mobango.com">jobs@mobango.com</a></p>
<p>We are currently undergoing rapid expansion and require a senior PHP Developer to join our team.</p>
<p>Technical requirements:</p>
<p>- PHP5 language (OO programming, SPL)<br />
- SQL knowledge<br />
- AJAX technologies knowledge (Javascript, XML, JSON)<br />
- familiar with TDD (PHPUnit)<br />
- familiar with PECL/PEAR packages<br />
- familiar with Subversion<br />
- exposure to MVC frameworks (Symfony, CakePHP, Zend) will be a big plus</p>
<p>The ideal candidate will be passionate about PHP development, enthusiastic about learning &#038; constant improvement and have a strong understanding of the Internet and emerging technologies.</p>
<p>Working with our programming team, you will be developing &#038; modifying our online software system. You will need to familiarise yourself with the intricacies of our custom-developed software, along with being capable of implementing new web and mobile based applications.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.pixzone.com/blog/342/hiring-senior-php-developer-for-fast-paced-mobile-company-at-mobango-ltd/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Move your bookmarks from Myweb to Delicious in 3 easy steps</title>
		<link>http://www.pixzone.com/blog/251/move-your-bookmarks-from-myweb-to-delicious-in-3-easy-steps/</link>
		<comments>http://www.pixzone.com/blog/251/move-your-bookmarks-from-myweb-to-delicious-in-3-easy-steps/#comments</comments>
		<pubDate>Mon, 27 Aug 2007 13:52:21 +0000</pubDate>
		<dc:creator>Federico Feroldi</dc:creator>
				<category><![CDATA[Nimboo]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[Ruby]]></category>
		<category><![CDATA[Yahoo]]></category>

		<guid isPermaLink="false">http://www.pixzone.com/blog/251/move-your-bookmarks-from-myweb-to-delicious-in-3-easy-steps/</guid>
		<description><![CDATA[How to migrate your Yahoo's Myweb bookmarks to your Delicious account in three easy steps.]]></description>
			<content:encoded><![CDATA[<p>When I discover <a href="http://www.delicious.com">delicious</a> it was too late for me since at the time I had too many bookmarks already tagged in Yahoo&#8217;s <a href="http://myweb.yahoo.com">Myweb</a>. But since then I&#8217;ve always wanted to move all my bookmarks to delicious but didn&#8217;t found how to do it, until now.</p>
<p>Some days ago I found this <a href="http://www.theurer.cc/blog/2006/08/29/python-myweb-to-delicious-exporter/">python script</a> that makes use of myweb and delicious web services to migrate the bookmarks.<br />
Unfortunately the script wasn&#8217;t very reliable, it was crashing quite often and, since I have <a href="http://del.icio.us/federico_f">more than 1500 bookmarks</a>, it was quite painful since every time I launched it, it was starting from scratch.</p>
<p>So I decided to build a new script (actually two)&#8230; in Ruby.</p>
<h2>Step 1 : prerequisites</h2>
<p>First of all you must <a href="http://www.google.it/search?q=install+ruby">install Ruby</a> and <a href="http://www.google.it/search?q=install+rubygems">rubygems</a> on your system.</p>
<p>Then you must install <a href="http://pablotron.org/software/rubilicious/">rubilicious</a> gem.</p>
<h2>Step 2 : export myweb bookmarks</h2>
<p>Here&#8217;s the first ruby script that you must run:</p>
<p><code lang="ruby"><br />
require 'net/http'<br />
require 'uri'<br />
require 'rexml/document'</p>
<p># YOU WANT TO MODIFY THIS<br />
yahoo_id = 'pix'</p>
<p>myweb_appid = 'YahooDemo'<br />
myweb_urlsearch = 'http://search.yahooapis.com/MyWebService/V1/urlSearch'</p>
<p>request_start_idx = 1<br />
request_max = 50</p>
<p>while(true)<br />
  url = myweb_urlsearch + '?' + {<br />
    :appid => myweb_appid,<br />
    :yahooid => yahoo_id,<br />
    :results => request_max,<br />
    :start => request_start_idx<br />
  }.to_a.collect {|kv| kv[0].to_s + '=' + kv[1].to_s}.join('&#038;')</p>
<p>  retries = 3<br />
  while(true)<br />
    $stderr.puts(" - Requesting URLs from [#{request_start_idx}] (#{retries} retries left) -> #{url}\n")</p>
<p>    http_resp = Net::HTTP.get_response(URI.parse(url))</p>
<p>    if(http_resp.code.to_i < 200 || http_resp.code.to_i > 299)<br />
      $stderr.puts(" ! request failed [#{http_resp.code}]\n")<br />
      retries -= 1<br />
      sleep(5) &#038;&#038; next if(retries > 0)<br />
      $stderr.puts(" ! too many retries, something is broken!\n")<br />
      exit<br />
    end<br />
    break # exit while loop<br />
  end</p>
<p>  xml_data = http_resp.body</p>
<p>  # extract event information<br />
  doc = REXML::Document.new(xml_data)</p>
<p>  tot_results = doc.root.attributes['totalResultsAvailable'].to_i<br />
  break unless tot_results > 0</p>
<p>  doc.elements.each('ResultSet/Result') do |r|<br />
    puts [<br />
      r.elements['Title'].text,<br />
      r.elements['Summary'].text,<br />
      r.elements['Url'].text,<br />
      r.elements['Tags'].collect() {|e| e.text.to_s}.join(','),<br />
    ].collect {|v| URI.escape(v.to_s) }.join('&#038;') + "\n"</p>
<p>    request_start_idx += 1<br />
  end</p>
<p>end<br />
</code></p>
<p>Copy this code and paste it to a file (like <em>myweb_export.rb</em>). You also want to set the <strong>yahoo_id</strong> variable with your myweb ID.</p>
<p>Then you can run the script:</p>
<p><code lang="bash"><br />
ruby myweb_export.rb > data.txt<br />
</code></p>
<h2> Step 3 : import bookmarks into delicious </h2>
<p>For the final step you&#8217;ll need the script below:</p>
<p><code lang="ruby"><br />
require 'rubilicious'<br />
require 'uri'</p>
<p>r = Rubilicious.new('USER', 'PASSWORD')</p>
<p>$stdin.each_line do |l|<br />
  title, description, url, keys = l.split('&#038;').collect { |i| URI.decode(i) }<br />
  keys = keys.split(',').collect { |k| k.strip.gsub(/\s+/, '-') }.join(' ')<br />
  puts title + "\n" + url + "\n" + keys + "\n---\n"<br />
  r.add(url, title, description, keys)<br />
  sleep(1)<br />
end<br />
</code></p>
<p>You want to set the proper values for <strong>USER</strong> and <strong>PASSWORD</strong> of your delicious account and copy the code to <em>deli_import.rb</em>.</p>
<p><code lang="bash"><br />
ruby deli_import.rb < data.txt<br />
</code></p>
<p>The script waits 1 second after each URL since this is required by the <a href="http://del.icio.us/help/api/">delicious API</a>.</p>
<p><em>Limitations: unfortunately since the Myweb web services only allow the search of public bookmarks, you'll not be able to migrate private bookmarks. You must do this by hand or wait that Yahoo will release a Myweb webservice that supports authentication.</em></p>
]]></content:encoded>
			<wfw:commentRss>http://www.pixzone.com/blog/251/move-your-bookmarks-from-myweb-to-delicious-in-3-easy-steps/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Cheap technical books on sale</title>
		<link>http://www.pixzone.com/blog/237/cheap-technical-books-on-sale/</link>
		<comments>http://www.pixzone.com/blog/237/cheap-technical-books-on-sale/#comments</comments>
		<pubDate>Mon, 30 Jul 2007 10:29:42 +0000</pubDate>
		<dc:creator>Federico Feroldi</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[Ruby]]></category>
		<category><![CDATA[Ruby on Rails]]></category>

		<guid isPermaLink="false">http://www.pixzone.com/blog/237/cheap-technical-books-on-sale/</guid>
		<description><![CDATA[I&#8217;m selling some of my technical book at very cheap prices, take a look and send me an email if you&#8217;re interested.]]></description>
			<content:encoded><![CDATA[<p>I&#8217;m selling some of my <a href="http://www.anobii.com/people/federicof/trade/">technical book at very cheap prices</a>, take a look and send me an <a href="mailto:pix@yahoo.it">email</a> if you&#8217;re interested.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.pixzone.com/blog/237/cheap-technical-books-on-sale/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Programming fun with Facebook Programming Puzzles</title>
		<link>http://www.pixzone.com/blog/236/programming-fun-with-facebook-programming-puzzles/</link>
		<comments>http://www.pixzone.com/blog/236/programming-fun-with-facebook-programming-puzzles/#comments</comments>
		<pubDate>Wed, 11 Jul 2007 09:16:33 +0000</pubDate>
		<dc:creator>Federico Feroldi</dc:creator>
				<category><![CDATA[Erlang]]></category>
		<category><![CDATA[Fun]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[Ruby]]></category>

		<guid isPermaLink="false">http://www.pixzone.com/blog/236/programming-fun-with-facebook-programming-puzzles/</guid>
		<description><![CDATA[While looking around the Facebook developers docs I&#8217;ve found a page called Programming Puzzles. Basicaly if you want to work for Facebook you better try to solve some of these puzzles with one or more of the suggested languages and send the source code along with your resume. Next week after my university final exams [...]]]></description>
			<content:encoded><![CDATA[<p>While looking around the Facebook developers docs I&#8217;ve found a page called <a href="http://www.facebook.com/jobs_puzzles/">Programming Puzzles</a>. Basicaly if you want to <a href="http://www.facebook.com/jobs_engineering.php">work for Facebook</a> you better try to solve some of these puzzles with one or more of the suggested languages and send the source code along with your resume.<br />
Next week after my university final exams I&#8217;ll try to solve some of them in Erlang and Ruby, in the meantime <a href="http://www.facebook.com/jobs_puzzles/">have a look</a> and try yourself. <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/236/programming-fun-with-facebook-programming-puzzles/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>
		<item>
		<title>Erlang, Ruby and PHP battle it out!</title>
		<link>http://www.pixzone.com/blog/226/erlang-ruby-and-php-battle-it-out/</link>
		<comments>http://www.pixzone.com/blog/226/erlang-ruby-and-php-battle-it-out/#comments</comments>
		<pubDate>Sat, 19 May 2007 10:35:06 +0000</pubDate>
		<dc:creator>Federico Feroldi</dc:creator>
				<category><![CDATA[Erlang]]></category>
		<category><![CDATA[Nimboo]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[Ruby]]></category>

		<guid isPermaLink="false">http://www.pixzone.com/blog/226/erlang-ruby-and-php-battle-it-out/</guid>
		<description><![CDATA[Yesterday I&#8217;ve been at the PHPDay 2007 in Verona with my Nimboo friend Giovanni Intini, during the travel to Verona on the train, we played with Erlang, Ruby and PHP writing small programs to compute Pythagorean triplets and comparing performances. I don&#8217;t want to tell you yet who&#8217;s the winner, you will find the results [...]]]></description>
			<content:encoded><![CDATA[<p>Yesterday I&#8217;ve been at the PHPDay 2007 in Verona with my <a href="http://www.nimboo.net/">Nimboo</a> friend <a href="http://tempe.st/">Giovanni Intini</a>, during the travel to Verona on the train, we played with Erlang, Ruby and PHP writing small programs to compute <a href="http://en.wikipedia.org/wiki/Pythagorean_triple">Pythagorean triplets</a> and comparing performances.<br />
I don&#8217;t want to tell you yet who&#8217;s the winner, you will find the results of our tests in <a href="http://tempe.st/2007/05/erlang-ruby-and-php-battle-it-out/">Giovanni&#8217;s blog</a>.</p>
<p><em>Update: the <a href="http://tempe.st/2007/05/the-battle-of-the-languages-part-ii/">battle continues here</a>.</em></p>
]]></content:encoded>
			<wfw:commentRss>http://www.pixzone.com/blog/226/erlang-ruby-and-php-battle-it-out/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>

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