<?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>echelon &#187; interesting stuff</title>
	<atom:link href="http://www.soa-world.de/echelon/category/interesting-stuff/feed" rel="self" type="application/rss+xml" />
	<link>http://www.soa-world.de/echelon</link>
	<description>A personal  technology  blog about software  development  and other interesting stuff.</description>
	<lastBuildDate>Wed, 28 Dec 2011 15:43:10 +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>The Decentralized Web Movement</title>
		<link>http://www.soa-world.de/echelon/2011/09/the-decentralized-web-movement.html</link>
		<comments>http://www.soa-world.de/echelon/2011/09/the-decentralized-web-movement.html#comments</comments>
		<pubDate>Sun, 04 Sep 2011 12:47:27 +0000</pubDate>
		<dc:creator>Sebastian Schaetz</dc:creator>
				<category><![CDATA[development]]></category>
		<category><![CDATA[interesting stuff]]></category>
		<category><![CDATA[software]]></category>
		<category><![CDATA[technology]]></category>

		<guid isPermaLink="false">http://www.soa-world.de/echelon/?p=754</guid>
		<description><![CDATA[Over the years computers grew in numbers and a logical step in their evolution was to connect them together to allow their users to share things. Little networks grew into huge networks and some computers gained more power than the rest: they called themselves &#8220;servers&#8221;. Today millions of people are connected online at the mercy [...]]]></description>
			<content:encoded><![CDATA[<p>Over the years computers grew in numbers and a logical step in their evolution was to connect them together to allow their users to share things. Little networks grew into huge networks and some computers gained more power than the rest: they called themselves &#8220;servers&#8221;. Today millions of people are connected online at the mercy of middleman who control the servers of the world.</p>
<p>This is not an introduction to an dystopian fantasy world but an excerpt from a promotion video for Opera Unite, a framework that allows users to host information from their home computer. It was a bold attempt to change the centralized architecture of the Internet. A <a href="http://dl.acm.org/citation.cfm?id=1578010">number</a> of <a href="http://en.wikipedia.org/wiki/Friend-to-friend">smart</a> <a href="http://en.wikipedia.org/wiki/Web_of_trust">people</a> have been pondering this idea even before Opera&#8217;s experiment <a href="http://factoryjoe.com/blog/2009/06/16/thoughts-on-opera-unite/">failed miserably</a>.</p>
<p><img src="http://www.soa-world.de/echelon/wp-content/uploads/2011/08/breakdown.jpg" alt="" title="breakdown" width="640" height="426" class="alignnone size-full wp-image-906" /><br />
<em style="font-size: 10px">Communication breakdown, image by <a href="http://www.flickr.com/photos/miuenski/3640424543/">miuenski</a></em></p>
<p>And the concept of a decentralized web is gaining traction: more and more people realize something has to change. The cause for this trend is obvious: the number of data security and privacy disasters that were made public has spiked in recent times . In April &#8217;11 for example an update to the <a href="https://www.dropbox.com/terms/#security">security terms of service</a> of the widely used Dropbox tool <a href="http://tirania.org/blog/archive/2011/Apr-19.html">revealed</a> that contrary to previous claims, Dropbox Inc. has full access to user data. </p>
<p>An <a href="http://www.eff.org/deeplinks/2010/04/facebook-timeline">analysis</a> of the changes to the Facebook privacy policy over time paints a gloomy picture of how the world&#8217;s largest social network changed &#8220;from a private communication space to a platform that shares user information with advertising and business partners while limiting the users&#8217; options to control their own information&#8221;. </p>
<p>With more and more of our personal data moving to centralized servers or &#8220;cloud services&#8221; &#8211; a term that should be used as an euphemism &#8211; we&#8217;re no longer in control. But there is hope in sight: there are dozens of projects out there that try to stop the trend of centralization and data consolidation.</p>
<p><strong>Decentralized Applications</strong></p>
<p>The most popular of the lot is probably <a href="https://joindiaspora.com/">Diaspora</a>. The project got a lot of attention in April 2010 when they managed to raise about $200.000 from almost 6500 supporters. The software looks and feels very much like Facebook or Google+. The innovation is that users are allowed and even encouraged to set up their own Diaspora node. This essentially means allowing users to set up their own Facebook server at home (or wherever they want). The Diaspora nodes are able to interact with each other to form one distributed social network. Furthermore, instead of users having to log in to one central server, they may choose one of many servers administered by different entities. In the end they can decide whom to trust with their data and there is no one entity that has access to all the data.</p>
<p>A social network project that is also worth mentioning follows the same principle. Its name is <a href="http://buddycloud.com/">Buddycloud</a>. The main difference between Buddycloud and Diaspora can be found in their implementation details: Buddycloud builds upon <a href="http://en.wikipedia.org/wiki/Extensible_Messaging_and_Presence_Protocol">XMPP</a> (Extensible Messaging and Presence Protocol), a more than 10 year old and often implemented specification for &#8220;near-real-time, extensible instant messaging, presence information, and contact list maintenance&#8221;. There are many unknowns in this area so building on such proven protocols instead of defining new standards might proof to be an advantage. But there are many more social networking projects out there. Wikipedia has a <a href="http://en.wikipedia.org/wiki/Distributed_social_network">nice list</a>. </p>
<p>The <a href="http://unhosted.org/">Unhosted</a> project implements another concept. Instead of providing a specific decentralized service it aims to be a meta-service. And after talking to Michiel de Jong I have the impression his plan is even more crucial. He aims to create something fundamental, a protocol, an architecture, a new way of writing web applications. The idea is the following: the traditional architecture of a hosted website provides both processing and storage. An unhosted website only hosts the application, not the data. Unhosted wants to separate the application from the data. By storing the data in another location and combining both application and data only in the browser, the application provider can never access the data. An ingenious and very ambitious idea. I hope they succeed!</p>
<p><strong>Decentralized Storage</strong></p>
<p>A project that aims to replace Dropbox is <a href="http://owncloud.org/">ownCloud</a>, an open personal cloud which runs on your personal server. It enables accessing your data from all of your devices. Sharing with other people is also possible. It supports automatic backups, versioning and encryption.</p>
<p>The <a href="http://lockerproject.org/">Locker Project</a> has similar goals. They allow self-hosting (installing their software on your own server) and offer a hosted service similar to what Dropbox provides. The service pulls in and archives all kinds of data that the user has permission to access and stores this data into the user’s personal Locker: Tweets, photos, videos, click-streams, check-ins, data from real-world sensors like heart monitors, health records and financial records like transaction histories (<a href="http://lifestreamblog.com/introducing-the-locker-project-an-open-lifestreaming-platform-for-the-future/">source</a>).</p>
<p><img src="http://www.soa-world.de/echelon/wp-content/uploads/2011/08/hope.jpg" alt="" title="hope" width="640" height="479" class="alignnone size-full wp-image-949" /><br />
<em style="font-size: 10px">Shimmering, image by <a href="http://www.flickr.com/photos/jason-samfield/5325558533/">Jason A. Samfield</a></em></p>
<p>A third project worth mentioning is <a href="http://sparkleshare.org/">sparkleshare</a>. It is similar to the other projects in this category but allows pluggable backends. That means you can choose to use for example Github as backend for your data or of course your personal server. Awesome!</p>
<p><strong>Freedom to the Networks</strong></p>
<p>Projects such as <a href="http://k0a1a.net/netless/">netless</a> carry the idea even further because after the data is liberated, the connection itself is a soft spot. Network connections should be liberated from corporate and government control by circumventing the big centralized data hubs and instead installing a decentralized wireless mesh network where everyone can participate and communicate. </p>
<p>The adventurous netless project plans to use the city transportation grid as its data backbone. Nodes of the network are attached to city vehicles &#8211; trams, buses, taxis and possibly &#8211; pedestrians. Information exchange between the nodes happens only when the carriers pass by each other in the city traffic. Digital data switches its routes just the same way you&#8217;d switch from tram number 2 to bus number 5. Very inspiring.</p>
<p>Another idea is to utilize networks of mobile phones to create a mesh network. The <a href="http://www.servalproject.org/">serval project</a> is working on this. And they have a prototype for the Android platform ready.</p>
<p>The German <a href="http://www.freifunk.net/">Freifunk</a> community pursues a similar goal. It is a non-commercial open initiative to support free radio networks in the German region. It is part of the international movement for free and wireless radio networks (<a href="http://en.wikipedia.org/wiki/Freifunk">source</a>).</p>
<p>A purely software based project is <a href="https://www.torproject.org/">Tor</a>. It is free software and an open network that helps its users to defend against a form of network surveillance that threatens personal freedom and privacy as well as confidential business activities and relationships.</p>
<p><strong>Peer to Peer Currency</strong></p>
<p>One integral thing this article did not talk about yet is money. <a href="http://www.bitcoin.org/">Bitcoin</a>, a peer to peer currency, might be the missing puzzle piece. The Bitcoin system has no central authority that issues new money or tracks transactions &#8211; it is managed collectively by the network.</p>
<p>A major problem of digital currency has been preventing double-spending. Digital money can be copied multiple times so a mechanism is necessary to forbid spending money twice. Bitcoin refrains from having actual digital coins. The system is merely one large transaction log that tracks what money was transferred where.</p>
<p>Each participant has a pair of public and private keys to sign transactions and to allow others to verify transactions. The transactions are entered into a global ever running log that is signed in regular intervals. The signing of the log is designed to require extensive computation time. The entire network of participating users is required to sign the log. </p>
<p>This protects the entire system from false signatures and from anyone tempering with the log and modifying past transactions. An attacker would have to have more computational power at his disposal than the entire Bitcoin network to forge transactions.</p>
<p>Users that give their computing time to the network are rewarded with Bitcoins for their troubles. This is also how the money is generated in the first place. In addition, participants that transfer money are free to include a transaction fee in their order. This extra money is given to the particular user signing the transaction.</p>
<p>A considerable number of <a href="https://en.bitcoin.it/wiki/Trade">sites</a> have emerged that accept Bitcoins in exchange for services or goods. You can buy for example socks online or even pay for your lunch at a burger restaurant in Berlin. </p>
<p><strong>Conclusion</strong></p>
<p>In closing, I find it encouraging, that so many people feel that things have to change and are developing ideas and projects to make it happen. We will see many exciting things in the future and despite the overwhelming might of well-established products, I am hopeful.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.soa-world.de/echelon/2011/09/the-decentralized-web-movement.html/feed</wfw:commentRss>
		<slash:comments>19</slash:comments>
		</item>
		<item>
		<title>Chaos Communication Camp</title>
		<link>http://www.soa-world.de/echelon/2011/08/chaos-communication-camp.html</link>
		<comments>http://www.soa-world.de/echelon/2011/08/chaos-communication-camp.html#comments</comments>
		<pubDate>Sun, 14 Aug 2011 20:58:54 +0000</pubDate>
		<dc:creator>Sebastian Schaetz</dc:creator>
				<category><![CDATA[art]]></category>
		<category><![CDATA[development]]></category>
		<category><![CDATA[interesting stuff]]></category>
		<category><![CDATA[personal]]></category>
		<category><![CDATA[technology]]></category>

		<guid isPermaLink="false">http://www.soa-world.de/echelon/?p=834</guid>
		<description><![CDATA[I just returned from a world of distorted day-night-rhythm, caffeine, camping, data toilets, colorful lights and most importantly ingenious people and projects. There were some great talks and many great hackerspaces from Germany and around the world were attending. CCC Rocket, image by Zunkel Every attendee at the conference received a r0cket badge when arriving [...]]]></description>
			<content:encoded><![CDATA[<p>I just returned from a world of distorted day-night-rhythm, caffeine, camping, data toilets, colorful lights and most importantly ingenious people and projects. There were some <a href="ftp://media.ccc.de/events/camp2011/video/">great talks</a> and many great hackerspaces from Germany and around the world were attending. </p>
<div style="float: left; padding-right: 8px;">
<img src="http://www.soa-world.de/echelon/wp-content/uploads/2011/08/rocket.jpg" alt="" title="rocket" width="379" height="500" class="alignleft size-full wp-image-850"/><br/><em style="font-size: 10px">CCC Rocket, image by <a href="http://www.flickr.com/photos/zunk3l/6033197865/">Zunkel</a></em></div>
<p>Every attendee at the conference received a <a href="http://r0ket.badge.events.ccc.de/">r0cket badge</a> when arriving at the campground. It&#8217;s a &#8220;full featured microcontroller development board&#8221; including a 32-bit ARM Cortex-M3 LPC1343 microcontroller, a 96×68 monochrome LCD and 2.4GHz transceiver for mesh networking.</p>
<p>There was a <a href="http://events.ccc.de/camp/2011/wiki/POC">DECT</a> and <a href="http://events.ccc.de/camp/2011/wiki/GSM">GSM</a> phone network setup.</p>
<p>HAM-radio enthusiasts from <a href="http://metalab.at/wiki/English">Metalab</a> were working on <a href="http://events.ccc.de/camp/2011/wiki/Moonbounce">Moonbounce</a>: radio communication over a distance of at least 2 light-seconds using the Moon as reflector. </p>
<p>A couple of microcopter and drone projects presented their work. There was for example the <a href="http://ng.uavp.ch/moin/FrontPage">NG-UAVP</a> project. They released a couple of great <a href="http://www.youtube.com/watch?v=ljJdnHY0YNc">areal videos</a>. A project I did not know but I find particularly fascinating is the <a href="http://paparazzi.enac.fr/wiki/Main_Page">Paparazzi project</a>. It is an &#8220;exceptionally powerful and versatile autopilot system for fixedwing aircrafts as well as multicopters&#8221;. This is a project that is for example used by Scientists from the Finnish Meteorological Institute to measure temperature, humidity, pressure, wind direction and speed in altitudes up to 1000m at Antarctica. Very impressive!</p>
<p>For me personally, meeting a number of interesting people that are part of the decentralized web movement was really great. Because of some truly enlightening conversation with people from the <a href="http://freedomboxfoundation.org/">FreedomBox Foundation</a>, Michiel de Jong from <a href="http://unhosted.org/">unhosted.org</a> and <a href="http://buddycloud.com/">buddycloud</a> developers I started thinking about the whole topic again especially about host-proof applications and what a host-proof social network could look like.</p>
<p><img src="http://www.soa-world.de/echelon/wp-content/uploads/2011/08/camp.jpg" alt="" title="camp" width="640" height="425" class="alignleft size-full wp-image-867" /><br />
<em style="font-size: 10px">Disco ball in a tree, image by <a href="http://www.flickr.com/photos/zunk3l/6036998076/">Zunkel</a></em></p>
<p>Too bad this event is not every year. I had such a great time I would love to go again soon!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.soa-world.de/echelon/2011/08/chaos-communication-camp.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>MGPU v0.1</title>
		<link>http://www.soa-world.de/echelon/2011/08/mgpu-v0-1.html</link>
		<comments>http://www.soa-world.de/echelon/2011/08/mgpu-v0-1.html#comments</comments>
		<pubDate>Thu, 04 Aug 2011 19:00:21 +0000</pubDate>
		<dc:creator>Sebastian Schaetz</dc:creator>
				<category><![CDATA[development]]></category>
		<category><![CDATA[interesting stuff]]></category>
		<category><![CDATA[software]]></category>
		<category><![CDATA[technology]]></category>

		<guid isPermaLink="false">http://www.soa-world.de/echelon/?p=824</guid>
		<description><![CDATA[Today I&#8217;m proud to announce the first release of my MGPU library. The library strives to simplify the implementation of high performance applications and algorithms on multi-GPU systems. Its main goal is both to abstract platform dependent functions and vendor specific APIs, as well as simplifying communication between different compute elements. The library is currently [...]]]></description>
			<content:encoded><![CDATA[<p>Today I&#8217;m proud to announce the first release of my MGPU library. The library strives to simplify the implementation of high performance applications and algorithms on multi-GPU systems. Its main goal is both to abstract platform dependent functions and vendor specific APIs, as well as simplifying communication between different compute elements. The library is currently an alpha release containing only limited yet already useful functionality.</p>
<p><img src="http://www.soa-world.de/echelon/wp-content/uploads/2011/08/4498443106_531213b279_z.jpg" alt="" title="4498443106_531213b279_z" width="640" height="426" class="alignnone size-full wp-image-835" /><br />
<em style="font-size: 10px">Launch of Shuttle Discovery, image by <a href="http://www.flickr.com/photos/hdrphotographyblog/4498443106/">Scott Kublin</a></em></p>
<p>The repository can be found here: <a href="https://github.com/sschaetz/mgpu">https://github.com/sschaetz/mgpu</a> and documentation is available from here: <a href="http://sschaetz.github.com/mgpu/">http://sschaetz.github.com/mgpu/</a> </p>
<p>There are also archives available: <a href="https://github.com/sschaetz/mgpu/raw/archives/mgpu_0_1.tar.bz2">mgpu_0_1.tar.bz2</a> and <a href="https://github.com/sschaetz/mgpu/raw/archives/mgpu_0_1.zip">mgpu_0_1.zip</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.soa-world.de/echelon/2011/08/mgpu-v0-1.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Nvidia Driver Version on Linux</title>
		<link>http://www.soa-world.de/echelon/2011/07/nvidia-driver-version-on-linux.html</link>
		<comments>http://www.soa-world.de/echelon/2011/07/nvidia-driver-version-on-linux.html#comments</comments>
		<pubDate>Fri, 01 Jul 2011 13:29:53 +0000</pubDate>
		<dc:creator>Sebastian Schaetz</dc:creator>
				<category><![CDATA[development]]></category>
		<category><![CDATA[interesting stuff]]></category>
		<category><![CDATA[software]]></category>
		<category><![CDATA[technology]]></category>

		<guid isPermaLink="false">http://www.soa-world.de/echelon/?p=822</guid>
		<description><![CDATA[How to get the version of the Nvidia kernel module on Linux? I&#8217;m posting this here because I&#8217;m sure I will forget this again. This is very relevant when evaluating that the proper driver is installed for CUDA use. On my system this returns:]]></description>
			<content:encoded><![CDATA[<p>How to get the version of the Nvidia kernel module on Linux? I&#8217;m posting this here because I&#8217;m sure I will forget this again. This is very relevant when evaluating that the proper driver is installed for CUDA use.</p>
<pre class="brush: bash; title: ; notranslate">
cat /proc/driver/nvidia/version
</pre>
<p>On my system this returns:</p>
<pre class="brush: bash; title: ; notranslate">
NVRM version: NVIDIA UNIX x86_64 Kernel Module  270.41.19
GCC version:  gcc version 4.4.3 (Ubuntu 4.4.3-4ubuntu5)
</pre>
]]></content:encoded>
			<wfw:commentRss>http://www.soa-world.de/echelon/2011/07/nvidia-driver-version-on-linux.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Talks Page</title>
		<link>http://www.soa-world.de/echelon/2011/05/talks-page.html</link>
		<comments>http://www.soa-world.de/echelon/2011/05/talks-page.html#comments</comments>
		<pubDate>Thu, 26 May 2011 21:10:11 +0000</pubDate>
		<dc:creator>Sebastian Schaetz</dc:creator>
				<category><![CDATA[development]]></category>
		<category><![CDATA[interesting stuff]]></category>
		<category><![CDATA[personal]]></category>
		<category><![CDATA[software]]></category>
		<category><![CDATA[technology]]></category>

		<guid isPermaLink="false">http://www.soa-world.de/echelon/?p=815</guid>
		<description><![CDATA[I added a Talks-page to this blog. I plan to list and publish interesting talks I gave at various occasions. Currently the page lists two talks: a GPGPU seminar I gave a year ago at my old university and just recently I had the honor of speaking at BoostCon about the project I worked on [...]]]></description>
			<content:encoded><![CDATA[<p>I added a <a href="http://www.soa-world.de/echelon/talks">Talks-page</a> to this blog. I plan to list and publish interesting talks I gave at various occasions. Currently the page lists two talks: a GPGPU seminar I gave a year ago at my old <a href="http://www.hs-regensburg.de/funktion/english.html">university</a> and just recently I had the honor of speaking at <a href="http://boostcon.boost.org/">BoostCon</a> about the project I worked on last year: a library for the <a href="http://en.wikipedia.org/wiki/Cell_%28microprocessor%29">Cell processor</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.soa-world.de/echelon/2011/05/talks-page.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Stallman was right</title>
		<link>http://www.soa-world.de/echelon/2011/04/stallman-was-right.html</link>
		<comments>http://www.soa-world.de/echelon/2011/04/stallman-was-right.html#comments</comments>
		<pubDate>Thu, 07 Apr 2011 20:33:05 +0000</pubDate>
		<dc:creator>Sebastian Schaetz</dc:creator>
				<category><![CDATA[development]]></category>
		<category><![CDATA[interesting stuff]]></category>
		<category><![CDATA[personal]]></category>
		<category><![CDATA[software]]></category>
		<category><![CDATA[technology]]></category>

		<guid isPermaLink="false">http://www.soa-world.de/echelon/?p=480</guid>
		<description><![CDATA[&#8220;Stallman was right&#8221; is one of the important messages Eben Moglen conveys in his recent talks about Freedom and the Cloud. He&#8217;s a convincing speaker, his arguments are striking and the cause might very well be one of the most important challenges the Internet faces right now. GNUtralized, image by Bruce Bottomley He speaks about [...]]]></description>
			<content:encoded><![CDATA[<p><em>&#8220;Stallman was right&#8221;</em> is one of the important messages <a href="http://emoglen.law.columbia.edu/">Eben Moglen</a> conveys in his <a href="http://isoc-ny.org/p2/?p=1773">recent</a> <a href="http://www.isoc-ny.org/?p=1338">talks</a> about Freedom and the Cloud. He&#8217;s a convincing speaker, his arguments are striking and the cause might very well be one of the most important challenges the Internet faces right now.</p>
<p><img src="http://www.soa-world.de/echelon/wp-content/uploads/2011/04/stallman.jpg" alt="" title="stallman" width="650" height="434" class="alignnone size-full wp-image-725" /><br />
<em style="font-size: 10px">GNUtralized, image by <a href="http://www.flickr.com/photos/bruceley/3235933298/">Bruce Bottomley</a></em></p>
<p>He speaks about privacy: the freedom to choose who to share what information with. He speaks about freedom of speech: the liberty to speak and communicate freely without censorship. He speaks about how we give up those freedoms, often without noticing or worse, without caring. By signing up to facebook. By using Gmail. </p>
<p>It&#8217;s insane if you think about it. We communicate with our friends, send them private messages, through a database in Northern California. We store our personal information including images in that same database. And while we put more and more information, more and more of our lives in that database, its owners are busy thinking about ways of how to make money with our data. By now I&#8217;m sure they have come to at least one conclusion: to make money they will share our data with entities we never intended to share it with.</p>
<p>It gets worse, and Eben Moglen elaborates this very well in his <a href="http://isoc-ny.org/p2/?p=1773">keynote</a> speech at <a href="http://www.fosdem.org/2011/">Fosdem 2011</a>. All our data is routed through and even stored in a company&#8217;s database. We can choose to trust that particular company to not do anything bad with our data. But we can never be sure that the company will act in our interest if it is offered incentives (&#8220;We won&#8217;t shut you down if you comply&#8221;) to share certain data with certain government agencies. Since our data is stored in a centralized manner, agencies <a href="http://projects.washingtonpost.com/top-secret-america/articles/monitoring-america/">the likes of NSA</a> would have a field day.</p>
<p>So indeed, Stallman was right when he called <a href="http://www.guardian.co.uk/technology/2008/sep/29/cloud.computing.richard.stallman">cloud computing a trap</a>. He advises us &#8220;to stay local and stick with our own computers&#8221;.</p>
<p><img src="http://www.soa-world.de/echelon/wp-content/uploads/2011/04/libre.jpg" alt="" title="libre" width="650" height="465" class="alignnone size-full wp-image-737" /><br />
<em style="font-size: 10px">free, image by <a href="http://www.flickr.com/photos/gi/121409547/">Gisela Giardino</a></em></p>
<p>Eben Moglen sees the urgency of these problems so he is taking action: informing the public with persuasive talks and gathering smart, ingenious and influential people to find solutions under the newly founded <a href="http://www.freedomboxfoundation.org/">FreedomBox Foundation</a>. The ingredients to the solution, in accordance to Stallman&#8217;s suggestion have been identified: </p>
<ol>
<li>cheap, compact <a href="http://en.wikipedia.org/wiki/Plug_computer">plug computers</a> that can be used as personal servers</li>
<li>a free (as in freedom) software stack that is designed to respect and preserve the user&#8217;s privacy</li>
<li><a href="http://en.wikipedia.org/wiki/Mesh_networking">mesh networking</a> technology to keep the network alive if centralized internet connections fail</li>
</ol>
<p>The idea is simple: replace all cloud services (social network, e-mail, photo storage etc) with distributed systems. The FreedomBox project aims to provide everyone with a compact, cheap, low-power plug computer. Such a device will come preloaded with free software that &#8220;knows how to securely contact your friends and business associates, is able to store and securely backup your personal data and generally maintaining your presence in the various networks you have come to rely on for communicating with people in society&#8221;.</p>
<p>There are a number of other projects out there that are worth mentioning here. A very interesting assessment of the current state of the social web and existing standards is the W3C Social Web Incubator Group <a href="http://www.w3.org/2005/Incubator/socialweb/XGR-socialweb-20101206/">report</a>. The <a href="https://joindiaspora.com/">Diaspora</a> project develops distributed and secure social networking software and is worth keeping an eye on. The FreedomBox community maintains a <a href="http://wiki.debian.org/FreedomBox/ExampleProjects">comprehensive list</a> of existing projects.</p>
<p>I expect the foundation to develop a software package that provides stable system software and that encompasses a number of existing projects that allow users to move from cloud services to their own server. I will help were I can and so should you!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.soa-world.de/echelon/2011/04/stallman-was-right.html/feed</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>C++ Workspace Class</title>
		<link>http://www.soa-world.de/echelon/2011/03/c-workspace-class.html</link>
		<comments>http://www.soa-world.de/echelon/2011/03/c-workspace-class.html#comments</comments>
		<pubDate>Thu, 31 Mar 2011 18:35:35 +0000</pubDate>
		<dc:creator>Sebastian Schaetz</dc:creator>
				<category><![CDATA[development]]></category>
		<category><![CDATA[interesting stuff]]></category>
		<category><![CDATA[software]]></category>
		<category><![CDATA[technology]]></category>

		<guid isPermaLink="false">http://www.soa-world.de/echelon/?p=624</guid>
		<description><![CDATA[Oftentimes algorithms require buffers for communication or need to store intermediate results. Or they need to pre-compute and store auxiliary data. Those algorithms are often called in loops with similar or identical parameters but different data. Creating required resources an algorithm needs in every invocation is inefficient and can be a performance bottleneck. I would [...]]]></description>
			<content:encoded><![CDATA[<p>Oftentimes algorithms require buffers for communication or need to store intermediate results. Or they need to pre-compute and store auxiliary data. Those algorithms are often called in loops with similar or identical parameters but different data. Creating required resources an algorithm needs in every invocation is inefficient and can be a performance bottleneck. I would like to give users a means of reusing objects across multiple calls to algorithms.</p>
<p><img src="http://www.soa-world.de/echelon/wp-content/uploads/2011/03/133895010_96c5ba668d_o.jpg" alt="" title="133895010_96c5ba668d_o" width="650" height="366" class="alignnone size-full wp-image-709" /><br />
<em style="font-size: 10px">Bethany Cooper, image by <a href="http://www.flickr.com/photos/schneertz/133895010/">Joe Futrelle</a></em></p>
<p>The basic idea is to have a generic class that either creates the required objects for you or returns an existing object, if you already created it. Inefficient code like this:</p>
<pre class="brush: cpp; title: ; notranslate">
algorithm(T1 input, T2 output, parameters)
{
  buffer mybuff(buffer_parameters);
  calculation(input, output, buffer);
  // buffer goes out of scope and is destroyed
}

for() algorithm(input, output, parameters);
</pre>
<p>creates a buffer object in each invocation of <em>algorithm</em>. This is oftentimes unnecessary. The buffer object could be reused in subsequent calls which would result in code such as:</p>
<pre class="brush: cpp; title: ; notranslate">
algorithm(T1 input, T2 output, parameters, workspace &amp; ws)
{
  buffer &amp; mybuff = ws.get&lt;buffer&gt;(name, buffer_parameters);
  calculation(input, output, buffer);
  // buffer is not destroyed
}

{
  workspace ws;
  for() algorithm(input, output, parameters, ws);
} // workspace goes out of scope; all objects are destoryed
</pre>
<p>The name in the above code acts as an object identifier. If the same object should be used a second time it has to be accessed using the same object identifier.</p>
<p><strong>More Features</strong></p>
<p>Specifying only the name of an object as its identifier might not be enough. The following code could be ambiguous and might result in an error:</p>
<pre class="brush: cpp; title: ; notranslate">
buffer &amp; mybuff = ws.get&lt;buffer&gt;(&quot;mybuff&quot;, size(1024));
// later call
buffer &amp; mybuff = ws.get&lt;buffer&gt;(&quot;mybuff&quot;, size(2048));
</pre>
<p>When using mybuff after the later call, it might be expected that the buffer has a size of 2048. But the workspace object returns the object created before which is smaller. A simple workaround would be to always resize the buffer before it is used. </p>
<p>As an alternative the workspace object can be instructed to not only consider the name as an object identifier when checking if the object already exists but also some parameter of the constructor. Wrapping parameters with the &#8220;arg&#8221; method marks them to be considered when resolving existing objects.</p>
<pre class="brush: cpp; title: ; notranslate">
buffer &amp; mybuff = ws.get&lt;buffer&gt;(&quot;mybuff&quot;, workspace::arg(size(1024)));
// later call
buffer &amp; mybuff = ws.get&lt;buffer&gt;(&quot;mybuff&quot;, workspace::arg(size(2048)));
</pre>
<p>This code will create two different buffer objects.</p>
<p><strong>Implementation</strong></p>
<p>The workspace holds a map of pointers to the objects it manages. The map&#8217;s key is an arbitrary name for the resource. In addition to the pointer, a functor that properly destroys the object referenced by the pointer is stored.</p>
<p>A call to <em>get&lt;T&gt;</em> will check if an object with &#8216;name&#8217; already exists. If not, an object is created using the parameters (as well as a function object to destroy it). If it exists a reference is returned.</p>
<p>If the workspace goes out of scope, the destructor iterates over all object the workspace holds and destroys them in reverse order of creation.</p>
<p>I used some of the nifty new C++0x language features (variadic templates, std::function and the lambda functions) to implement the workspace class. I thought this was a good idea since the Final Draft International Standard was <a href="http://herbsutter.com/2011/03/25/we-have-fdis-trip-report-march-2011-c-standards-meeting/">approved recently</a>. I found the features to be very powerful as well as incredibly useful.</p>
<p>The argument dependent lookup is implemented in a crude way: the arguments are appended to the name string as characters. This should be sufficient for basic use and works well for all built-in types.</p>
<p>Arguments that are supposed to be added to the object identifier are detected as they are wrapped in a special_arg class. Partial template specialization and the unpack operator help appending the arguments to the object identifier.</p>
<p>The current implementation can be found in my <a href="https://github.com/sschaetz/workspace">workspace git repository</a>.</p>
<p><strong>Discussion</strong></p>
<p>It might very well be that something like this already exists in a more elegant form and that I have simply not been aware of or failed to identify as a solution to this problem. I&#8217;m for example aware of pool allocators but I believe that I propose a more abstract concept. Buffers that are part of a workspace still could use a pool allocator.</p>
<p>Also the code in the repository is written rather quickly and I&#8217;m quite sure there are some rough edges where the code is not as efficient as it could be (passing by reference comes to mind).</p>
]]></content:encoded>
			<wfw:commentRss>http://www.soa-world.de/echelon/2011/03/c-workspace-class.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Technology and Art</title>
		<link>http://www.soa-world.de/echelon/2011/03/technology-and-art.html</link>
		<comments>http://www.soa-world.de/echelon/2011/03/technology-and-art.html#comments</comments>
		<pubDate>Wed, 16 Mar 2011 18:05:27 +0000</pubDate>
		<dc:creator>Sebastian Schaetz</dc:creator>
				<category><![CDATA[art]]></category>
		<category><![CDATA[interesting stuff]]></category>
		<category><![CDATA[technology]]></category>

		<guid isPermaLink="false">http://www.soa-world.de/echelon/?p=622</guid>
		<description><![CDATA[Oftentimes the merger of technology and art produces wonderful and fascinating things. It is maybe the kind of art I personally enjoy most since I can easily relate to it. Here are some examples I recently discovered: Alexandre Farto is &#8220;Vhils&#8221;, a Portuguese-born artist who amongst other things carves faces into wall. This alone, while [...]]]></description>
			<content:encoded><![CDATA[<p>Oftentimes the merger of technology and art produces wonderful and fascinating things. It is maybe the kind of art I personally enjoy most since I can easily relate to it. Here are some examples I recently discovered:</p>
<p><img src="http://www.soa-world.de/echelon/wp-content/uploads/2011/03/IMG_2213-Ian-Cox-No-Watermark_161.jpg" alt="" title="IMG_2213 Ian Cox No Watermark_16" width="400" height="552" class="alignleft size-full wp-image-642" style="float: left; padding-right: 15px;"/></p>
<p><a href="http://www.alexandrefarto.com/">Alexandre Farto</a> is &#8220;Vhils&#8221;, a Portuguese-born artist who amongst other things carves faces into wall. This alone, while really great, does not really merge technology and art. In <a href="http://www.youtube.com/watch?v=dB084ildIDc">this video</a> one can guess how the artist works.</p>
<p>But <a href="http://www.youtube.com/watch?v=t6FU1Fvn9Nk">this video</a> depicts Vhils&#8217; art in an even cooler light: it gives the illusion, that the artwork is literally blasted in the wall. Truly amazing.</p>
<p>I discovered this through a &#8220;hack a day&#8221; <a href="http://hackaday.com/2011/02/26/boom-goes-the-dynamite-murals-made-with-precision-explosives/">article</a>. The article does not say much about how it is done. There&#8217;s a lively discussion in the comment section of article. </p>
<p>People seem to agree, that the artist in some cases carves the sculpture in the wall, covers the work and later unmasks it. He might use rubberized explosive: flat sheets of solid but flexible material that can be cut to specific shape, bent around solid surfaces and glued or taped in place (Source: <a href="http://en.wikipedia.org/wiki/Use_forms_of_explosives#Rubberized">Wikipedia</a>). </p>
<p>I have to agree with reader&#8217;s opinions that is is rather unlikely that these are controlled explosions and that the artists creates his work through designing the explosions. The work is nonetheless impressive. You can find <a href="http://www.alexandrefarto.com/#277109/Walls">more images</a> like this an other works on the artist&#8217;s <a href="http://www.alexandrefarto.com/">website</a>.</p>
<p>The merger of art and technology is more apparent in the work of <a href="http://en.wikipedia.org/wiki/Generative_art">generative artists</a> such as <a href="http://www.michael-hansmeyer.com/">Michael Hansmeyer</a>. In the work presented here, the artist designs columns using subdivision processes. He feeds his algorithm parameters that result in a distinct local variance in the patterns that are generated. This results in columns with millions of faces (image on the left).</p>
<p><img src="http://www.soa-world.de/echelon/wp-content/uploads/2011/03/columns.jpg" alt="" title="columns" width="700" height="335" class="alignleft size-full wp-image-670" /></p>
<p>The artists calls his work Computational Architecture. But generating a column model is only the first step of his process. In a second step the columns are actually produced as a layered model using 1mm sheet. That is 2700 sheets for a 2.7 meter high column. Cutting paths are calculated by intersecting the column with a plane and sheets are cut using a mill or a laser. The image on the right shows part of a fabricated column. I guess the color is a result of the fabrication process.</p>
<p>Read more about the artist&#8217;s process <a href="http://www.michael-hansmeyer.com/projects/columns_info.html?screenSize=1&#038;color=1#undefined">here</a> including a video of a rendered column. More column images can be found <a href="http://www.michael-hansmeyer.com/projects/columns.html?screenSize=1&#038;color=1">here</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.soa-world.de/echelon/2011/03/technology-and-art.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Good? Music?</title>
		<link>http://www.soa-world.de/echelon/2011/03/good-music.html</link>
		<comments>http://www.soa-world.de/echelon/2011/03/good-music.html#comments</comments>
		<pubDate>Fri, 04 Mar 2011 20:26:55 +0000</pubDate>
		<dc:creator>Sebastian Schaetz</dc:creator>
				<category><![CDATA[interesting stuff]]></category>
		<category><![CDATA[music]]></category>
		<category><![CDATA[personal]]></category>

		<guid isPermaLink="false">http://www.soa-world.de/echelon/?p=615</guid>
		<description><![CDATA[I added an &#8220;art&#8221; and &#8220;music&#8221; section to the blog. I&#8217;d like to share two albums I currently enjoy a lot and listen to almost exclusively. There&#8217;s &#8220;Black Rainbow&#8221; by Aucan and &#8220;Peanut Butter Blues &#038; Melancholy Jam&#8221; by Ghostpoet. Two very different but ingenious albums. My favorite track from the Aucan album is &#8220;Heartless&#8221;. [...]]]></description>
			<content:encoded><![CDATA[<p>I added an &#8220;art&#8221; and &#8220;music&#8221; section to the blog. I&#8217;d like to share two albums I currently enjoy a lot and listen to almost exclusively. There&#8217;s &#8220;Black Rainbow&#8221; by <a href="http://www.myspace.com/aucan">Aucan</a> and &#8220;Peanut Butter Blues &#038; Melancholy Jam&#8221; by <a href="http://www.ghostpoet.co.uk/">Ghostpoet</a>. Two very different but ingenious albums.</p>
<p><img src="http://www.soa-world.de/echelon/wp-content/uploads/2011/03/albums1.jpg" alt="" title="albums1" width="650" height="320" class="alignnone size-full wp-image-616" /></p>
<p>My favorite track from the Aucan album is &#8220;Heartless&#8221;. It&#8217;s really incredible. Listen to it here:</p>
<p><object data="http://bandcamp.com/EmbeddedPlayer/track=3654358072/size=venti/bgcol=ffffff/linkcol=06223F//" type="text/html" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="400" height="100"><param name="movie" value="http://bandcamp.com/EmbeddedPlayer/track=3654358072/size=venti/bgcol=ffffff/linkcol=06223F//"><param name="quality" value="high"><param name="allowNetworking" value="always"><param name="wmode" value="transparent"><param name="bgcolor" value="#ffffff"><param name="allowScriptAccess" value="never"><object data="http://bandcamp.com/EmbeddedPlayer/track=3654358072/size=venti/bgcol=ffffff/linkcol=06223F//" type="text/html" width="400" height="100"></object></object></p>
<p>From the Ghostpoet album I currently most enjoy &#8220;Run Run Run&#8221; but I expect this to change over time since it&#8217;s an album that grows on you and that you have to listen a couple of times to really appreciate it. I don&#8217;t want to go into why I like these albums, others are light-years better at music critique than I am. I just want to say: it&#8217;s really good music. You should check it out.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.soa-world.de/echelon/2011/03/good-music.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>A simple lock-free queue in C++</title>
		<link>http://www.soa-world.de/echelon/2011/02/a-simple-lock-free-queue-in-c.html</link>
		<comments>http://www.soa-world.de/echelon/2011/02/a-simple-lock-free-queue-in-c.html#comments</comments>
		<pubDate>Tue, 01 Feb 2011 18:13:15 +0000</pubDate>
		<dc:creator>Sebastian Schaetz</dc:creator>
				<category><![CDATA[development]]></category>
		<category><![CDATA[interesting stuff]]></category>
		<category><![CDATA[software]]></category>
		<category><![CDATA[technology]]></category>

		<guid isPermaLink="false">http://www.soa-world.de/echelon/?p=524</guid>
		<description><![CDATA[A while ago I needed a simple lock-free queue in C++ that supports a single producer as well as one consumer. The reason to use a lock-free data structure instead of a regular std::queue guarded by mutex and condition variable for me was to avoid the overhead of exactly those mechanisms. Also since I never [...]]]></description>
			<content:encoded><![CDATA[<p>A while ago I needed a simple lock-free queue in C++ that supports a single producer as well as one consumer. The reason to use a lock-free data structure instead of a regular std::queue guarded by mutex and condition variable for me was to avoid the overhead of exactly those mechanisms. Also since I never came in contact with the interesting concept of lock-free data types, I thought this was an excellent opportunity to look into the matter.</p>
<p><img src="http://www.soa-world.de/echelon/wp-content/uploads/2011/02/lock1-e1296581808981.jpg" alt="" title="lock" width="600" height="347" class="alignnone size-full wp-image-587" /><br />
<em style="font-size: 10px">You can never go too far, image by <a href="http://www.flickr.com/photos/baboon/115446241/">Baboon</a></em></p>
<p>Unfortunately (or fortunately) I could not find a production ready lock-free queue in C++ for my platform (Linux). There is the <a href="http://msdn.microsoft.com/en-us/library/ee355358.aspx">concurrent_queue</a> class available in Visual Studio 2010, there&#8217;s the unofficial <a href="http://tim.klingt.org/boost_lockfree/">Boost.Lockfree</a> library (code is <a href="http://www.boostpro.com/vault/index.php?&#038;direction=0&#038;order=&#038;directory=Concurrent%20Programming">here</a>) but those options were not satisfying. I needed something simple that worked right out of the box.</p>
<p>Herb Sutter wrote an excellent <a href="http://www.drdobbs.com/high-performance-computing/210604448">article</a> a while back about designing a lock-free queue. It&#8217;s straight forward and functional. The only flaw it has from my point of view is the use of C++0x atomics which I wanted to refrain from including in my project for now. There&#8217;s of course the unofficial <a href="http://www.chaoticmind.net/~hcb/projects/boost.atomic/">Boost.Atomic</a> library, but again I wanted something simple.</p>
<p>So I reread Herbs article, especially the passage that explains the requirements for a &#8220;lock-free-safe&#8221; variable: atomicity, order and the availability of a compare and swap operation. Digging into the Boost.Atomic code I found that it is rather simple to get atomicity and order when using gcc. I&#8217;m using version 4.4.3. </p>
<p>Atomicity can be ensured using the <a href="http://gcc.gnu.org/onlinedocs/gcc-4.4.3/gcc/Atomic-Builtins.html">atomic functions</a> of gcc and order can be ensured using a memory barrier trick:</p>
<pre class="brush: cpp; title: ; notranslate">
type __sync_lock_test_and_set (type *ptr, type value)
asm volatile(&quot;&quot; ::: &quot;memory&quot;)
</pre>
<p>The first line is an atomic test and set operation and the second line is equivalent to a full memory barrier. With this functionality I was all set. Here is the modified code for the method the producer calls:</p>
<pre class="brush: cpp; title: ; notranslate">
void produce(const T&amp; t)
{
  last-&gt;next = new Node(t);                      // add the new item
  asm volatile(&quot;&quot; ::: &quot;memory&quot;);                   // memory barrier
  (void)__sync_lock_test_and_set(&amp;last, last-&gt;next);
  while(first != divider)                       // trim unused nodes
  {
    Node* tmp = first;
    first = first-&gt;next;
    delete tmp;
  }
}
</pre>
<p>I replaced the <code>atomic<Node*></code> members with regular pointers but exchanged the assignments that require atomicity and order by calls to <code>__sync_lock_test_and_set</code> preceded by the full memory barrier trick. The function call must be cast to <code>void</code> to prevent a &#8220;value computed is not used&#8221; warning.</p>
<pre class="brush: cpp; title: ; notranslate">
bool consume(T&amp; result)
{
  if(divider != last)                        // if queue is nonempty
  {
    result = divider-&gt;next-&gt;value; 	              // C: copy it back
    asm volatile(&quot;&quot; ::: &quot;memory&quot;);                 // memory barrier
    (void)__sync_lock_test_and_set(&amp;divider, divider-&gt;next);
    return true;          	                       // report success
  }
  return false;           	                    // else report empty
}
</pre>
<p>The full class can be downloaded <a href="http://www.soa-world.de/echelon/uploaded_files/lockfreequeue.cpp">here</a>. Please note that the class lacks some important functionality if your use-case is non-trivial (a proper copy-constructor comes to mind).</p>
<p><strong>What it is all about</strong></p>
<p>There is a collection of definitions of lock-free and non-blocking and wait-free algorithms and data structures that can be interesting to <a href="http://en.wikipedia.org/wiki/Non-blocking_algorithm">read</a>. </p>
<p>The idea of lock-free data structures is that they are written in a way that allows simultaneous access by multiple threads without the use of critical sections. They must be defined in a way that at any point in time any thread that has access to the data sees a well defined state of the structure. A modification was either done or not done, there is no in-between, no inconsistency. </p>
<p>This is why all critical modifications to the structure are implemented as atomic operations. It also explains why order is important: before critical stuff can be done, preparations have to be finished and must be seen by all participants.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.soa-world.de/echelon/2011/02/a-simple-lock-free-queue-in-c.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

