<?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/"
	xmlns:georss="http://www.georss.org/georss" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:media="http://search.yahoo.com/mrss/"
	>

<channel>
	<title>JCranky&#039;s Blog! &#187; dvsp</title>
	<atom:link href="http://jcranky.com/tag/dvsp/feed/" rel="self" type="application/rss+xml" />
	<link>http://jcranky.com</link>
	<description>Java, Scala, Agile and stuff, by JCranky =)</description>
	<lastBuildDate>Wed, 23 May 2012 13:48:24 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
<cloud domain='jcranky.com' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
<image>
		<url>http://0.gravatar.com/blavatar/a2edfd1ac837f723e9b475c8eb5a5bbd?s=96&#038;d=http%3A%2F%2Fs2.wp.com%2Fi%2Fbuttonw-com.png</url>
		<title>JCranky&#039;s Blog! &#187; dvsp</title>
		<link>http://jcranky.com</link>
	</image>
	<atom:link rel="search" type="application/opensearchdescription+xml" href="http://jcranky.com/osd.xml" title="JCranky&#039;s Blog!" />
	<atom:link rel='hub' href='http://jcranky.com/?pushpress=hub'/>
		<item>
		<title>A peer-to-peer project</title>
		<link>http://jcranky.com/2008/09/12/peer-to-peer-project/</link>
		<comments>http://jcranky.com/2008/09/12/peer-to-peer-project/#comments</comments>
		<pubDate>Fri, 12 Sep 2008 21:50:33 +0000</pubDate>
		<dc:creator>Paulo "JCranky" Siqueira</dc:creator>
				<category><![CDATA[peer-to-peer]]></category>
		<category><![CDATA[dvsp]]></category>
		<category><![CDATA[jxta]]></category>
		<category><![CDATA[p2p]]></category>

		<guid isPermaLink="false">http://jcranky.wordpress.com/?p=50</guid>
		<description><![CDATA[Since a few weeks ago, we&#8217;ve been involved in a peer-to-peer project, somewhat deeply &#8211; and a little less than this before. Then, in the last two weeks, we started to implement something. Just a small demonstration code (for now), to be sure the work is feasible. So, first question: What? After some discussions, we [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=jcranky.com&#038;blog=4406641&#038;post=50&#038;subd=jcranky&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Since a few weeks ago, we&#8217;ve been involved in a peer-to-peer project, somewhat deeply &#8211; and a little less than this before. Then, in the last two weeks, we started to implement something. Just a small demonstration code (for now), to be sure the work is feasible.</p>
<p><strong>So, first question: What?</strong></p>
<p>After some discussions, we decided to use <a title="guigoh" href="http://www.guigoh.com/" target="_blank">guigoh</a>&#8216;s conference as a first scenario to test the ideas. But before that, we should be able to have some independent peers communicating. This would be the very foundation for any work that comes later. Something like this:</p>
<div id="attachment_54" class="wp-caption alignnone" style="width: 246px"><a href="http://jcranky.files.wordpress.com/2008/09/peers.png"><img class="size-full wp-image-54" title="peers" src="http://jcranky.files.wordpress.com/2008/09/peers.png?w=490" alt="peers communications across a network"   /></a><p class="wp-caption-text">peers communicating across a network</p></div>
<p>This means that Peer1 must be able to reach Peer2, and any other Peer, across a network. It shouldn&#8217;t have to worry about the details on how to find and send a message to them. Also, the peers cannot depend on any central server or any kind of node that could represent a single point of failure. And the same must be true for all peers.</p>
<p>Based on some ideas from <a title="guigoh" href="http://www.guigoh.com/" target="_blank">guigoh</a>&#8216;s conference application, and from the Dynamic Virtual Super Peer (DVSP) model (more on this one in a future post, if Amir and Sotiris don&#8217;t mind <img src='http://s1.wp.com/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> ), plus the small concept explained above, we planned what should be done in terms of functionality. So this is it, in two simple steps:</p>
<p><strong>The conference initialization</strong>: One peer creates a new conference, store its information in what we are calling <em>ConferenceContext</em>, and send invitations to the other peers it wants to have part in the conference. The <em>ConferenceContext</em> is also sent with the invitation. Each of these peers can accept or decline the invitation, which will then define who the conference participants are.</p>
<p><strong>An ongoing conference</strong>: When the time for the conference arrives, a conference window is displayed at the peer&#8217;s screen. In this window, the user can type messages that the peers will exchange between themselves. In the end, it is a simple chat, but in a pure peer-to-peer architecture.</p>
<p><strong>Now for the difficult question: How?</strong></p>
<p>The next decision was technological: how is this going to be implemented? Doing everything from scratch is probably not a very good idea. Just Imagine having to write firewall traversal code by yourself, for a simple example of the trouble. There is just too much basic infrastructure work that would be necessary. And thus a lot of resources, which we don&#8217;t have.</p>
<p>There are a few options around the web, but not that much actually. I won&#8217;t list them here because I don&#8217;t tend to remember things I put aside (sorry :-p). The important thing to mention is the chosen technology: <a title="Jxta" href="http://www.jxta.org/" target="_blank">Jxta</a>.</p>
<p>I won&#8217;t dive into <a title="Jxta" href="http://www.jxta.org/" target="_blank">Jxta</a> right now. Instead, the next post will probably be about it. So if you have any questions feel free to send it to me, and I&#8217;ll try to address them.</p>
<br /><img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/jcranky.wordpress.com/50/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/jcranky.wordpress.com/50/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/jcranky.wordpress.com/50/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/jcranky.wordpress.com/50/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/jcranky.wordpress.com/50/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/jcranky.wordpress.com/50/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/jcranky.wordpress.com/50/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/jcranky.wordpress.com/50/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/jcranky.wordpress.com/50/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/jcranky.wordpress.com/50/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/jcranky.wordpress.com/50/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/jcranky.wordpress.com/50/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/jcranky.wordpress.com/50/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/jcranky.wordpress.com/50/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/jcranky.wordpress.com/50/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/jcranky.wordpress.com/50/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=jcranky.com&#038;blog=4406641&#038;post=50&#038;subd=jcranky&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://jcranky.com/2008/09/12/peer-to-peer-project/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/3ebbb64cafa4d784a6f09a1886eaa5e7?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">paulosiqueira</media:title>
		</media:content>

		<media:content url="http://jcranky.files.wordpress.com/2008/09/peers.png" medium="image">
			<media:title type="html">peers</media:title>
		</media:content>
	</item>
	</channel>
</rss>
