<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
    xmlns:dc="http://purl.org/dc/elements/1.1/"
    xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
    xmlns:admin="http://webns.net/mvcb/"
    xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
    xmlns:content="http://purl.org/rss/1.0/modules/content/">

    <channel>
    <title>Planet Erlang</title>
    <link>http://www.planeterlang.org/en/planet/planet</link>
    <description></description>
    <dc:language>en</dc:language>
    <dc:creator>Planet Erlang</dc:creator>
    <dc:rights>Copyright 2009</dc:rights>
    <dc:date>2009-07-01T22:22:52+01:00</dc:date>
    <admin:generatorAgent rdf:resource="http://www.expressionengine.com/" />
    

    <item>
      <title>PubSub&#45;over&#45;Webhooks with RabbitHub</title>
      <link>http://www.planeterlang.org/en/planet/article/PubSub-over-Webhooks_with_RabbitHub_/</link>
      <guid>http://www.planeterlang.org/en/planet/article/PubSub-over-Webhooks_with_RabbitHub_/</guid>
      <author>Simon Willison</author>
      <description><![CDATA[<div class="blogmark segment"><p><a href="http://www.lshift.net/blog/2009/06/30/pubsub-over-webhooks-with-rabbithub">PubSub-over-Webhooks with RabbitHub</a>. RabbitMQ, the Erlang-powered AMQP message queue, is growing an HTTP interface based on webhooks and PubSubHubBub.</p>
</div> 
]]>
</description>
      <dc:subject>Blogs, Simon Willison</dc:subject>
      <dc:date>2009-07-01T22:22:52+01:00</dc:date>
    </item>

    <item>
      <title>OneTeam 3.0 for iPhone</title>
      <link>http://www.planeterlang.org/en/planet/article/OneTeam_3.0_for_iPhone/</link>
      <guid>http://www.planeterlang.org/en/planet/article/OneTeam_3.0_for_iPhone/</guid>
      <author>Nicolas Vérité</author>
      <description><![CDATA[<p>The new version 3.0 of OneTeam for iPhone has been released, with the <a href="http://en.wikipedia.org/wiki/Push_technology" title="push technology">push notification feature</a> from <a href="http://en.wikipedia.org/wiki/Apple_Push_Notification_Service" title="Apple Push Notification Service">Apple Push Notification Service</a> (APNS).</p>  <p>When moving with your iPhone, as a pedestrian, bike rider, car driver or in public transportation, you might have to shutdown the OneTeam for iPhone application while staying connected to your XMPP server. It is convenient for battery saving purposes, or because you want to use another application (iPhone OS 3.0 still does not authorize background applications).</p>

<p>When an event occurs on your XMPP server, it is sent to the APNS (Apple Push Notification Service), which instantly relays it to your iPhone. A push notification is then poped up on your screen, with a sound played. The OneTeam badge (icon) is then changed, showing a new event has arrived, or the number of events waiting for you to read.</p>

<p><img src="http://www.process-one.net/images/uploads/Screenshot_2009.06_.29_22_.29_.44_.png" style="border: 0;" alt="image" width="320" height="480" /></p>

<p>You simply have to tap the OneTeam icon to read your new event. The reconnection will be fast and seamless.</p>

<p>This feature is very handy, since you can use your iPhone the way you want (browse the web, use another application) while still being instantly notified as if you were using OneTeam on the background.</p>

<p>This push notification feature is also deployed on OneTeam.im XMPP server, and ejabberd has a component, IMpush, that can send push notifications to the APNS. This makes ejabberd and OneTeam the first XMPP client and server solution that supports the Apple push system.</p>

<p>OneTeam for iPhone has also received fixes and improvements: groupchat, file transfer, image sending&#8230; Here are a few screenshots:</p>

<p>An example of Groupchat:</p>
<p><img src="http://www.process-one.net/images/uploads/Screenshot_2009.06_.29_22_.41_.22_.png" style="border: 0;" alt="image" width="320" height="480" /></p>

<p>See the Push configuration screen:</p>
<p><img src="http://www.process-one.net/images/uploads/Screenshot_2009.06_.29_22_.28_.34_.png" style="border: 0;" alt="image" width="320" height="480" /></p>

<p>And the general OneTeam confguration:</p>
<p><img src="http://www.process-one.net/images/uploads/Screenshot_2009.06_.29_22_.29_.09_.png" style="border: 0;" alt="image" width="320" height="480" /></p>

<p>A few comments on the experience after having used OneTeam for iPhone with push and groupchat:
<ul><li>&#8220;Battery life is not impacted by being always connected to my XMPP server on mobile. I have used all mobile XMPP client and this is the first time I can truely stay connected all the time. I feel this is really really the premise of the mobile revolution for mobile instant messaging and mobile XMPP.&#8220;
</li><li>&#8220;OneTeam for iPhone client has the type of feature you would expect from a good desktop XMPP client and not a mobile one. You can use groupchat, file transfer. This is really what I need professionally.&#8220;</lI></ul></p>

<p>OneTeam for iPhone will be available on the Apple&#8217;s App Store in a few days, after the usual moderation period at Apple.</p>

<p>IMpush is sold as soon as today on the <a href="http://www.process-one.net/en/imstore/" title="IMstore">IMstore</a> to prepare ejabberd servers ahead of OneTeam 3.0 with push.</p> 
]]>
</description>
      <dc:subject>Companies, ProcessOne</dc:subject>
      <dc:date>2009-07-01T16:18:21+01:00</dc:date>
    </item>

    <item>
      <title>erlang:lists/1</title>
      <link>http://www.planeterlang.org/en/planet/article/erlanglists1/</link>
      <guid>http://www.planeterlang.org/en/planet/article/erlanglists1/</guid>
      <author>Chad DePue</author>
      <description><![CDATA[<p>Welcome to the start of the erlang:lists series where we list some interesting happenings in the world of Erlang.</p>
<p>erlang:lists(CouchDBNaked) - Harish Mallipeddi, a performance engineer at Yahoo, has put together a great post on the <a href="http://blog.poundbang.in/post/132952897/couchdb-naked">internals of CouchDB</a>, and how to even use some of the couch source to build your own B-Tree based mini-application.</p>
<p>erlang:lists(ErlangFactory) - Slides and videos are up from the <a href="http://www.erlang-factory.com/conference/London2009/talks">2009 London Erlang Factory</a> conference. About half have videos and most have slides available. Not sure yet if they will all have videos or if there are reasons for not showing the films for some speakers.</p>
<p>Each week I&#8217;ll mention a few must-see articles, blog entries or videos. If you have something to bring to my attention - contact me at chad at inakanetworks com.</p> 
]]>
</description>
      <dc:subject>Blogs, Erlang Inside</dc:subject>
      <dc:date>2009-07-01T04:15:41+01:00</dc:date>
    </item>

    <item>
      <title>Rats! Plugin for NetBeans#1: Syntax Highlighting</title>
      <link>http://www.planeterlang.org/en/planet/article/Rats_Plugin_for_NetBeans1_Syntax_Highlighting/</link>
      <guid>http://www.planeterlang.org/en/planet/article/Rats_Plugin_for_NetBeans1_Syntax_Highlighting/</guid>
      <author></author>
      <description><![CDATA[<p>
I&#8217;ve used <a rel="nofollow" target="_blank" href="http://cs.nyu.edu/rgrimm/xtc/rats.html">Rats! parser generator<a rel="nofollow"> heavily on Scala/Erlang plugin for NetBeans, but not write a plugin for Rats! itself.
<p>
So I spent my weekend days on a simple Rats! editor module, which implemented syntax highlighting. It&#8217;s built on Scala.
<p>
Here&#8217;s the snapshot:
<p>
<a rel="nofollow" target="_blank" href="http://blogtrader.net/resources/dcaoyuan/RatsEditor-090630.png"><img alt="nn" width="700" src="http://blogtrader.net/resources/dcaoyuan/RatsEditor-090630.png"/></a>
<p>
It will be available in couple of days.
<p></a></a> 
]]>
</description>
      <dc:subject>Blogs, Caoyuan Blog</dc:subject>
      <dc:date>2009-06-30T18:19:00+01:00</dc:date>
    </item>

    <item>
      <title>ProcessOne presentations at Erlang Factory</title>
      <link>http://www.planeterlang.org/en/planet/article/ProcessOne_presentations_at_Erlang_Factory/</link>
      <guid>http://www.planeterlang.org/en/planet/article/ProcessOne_presentations_at_Erlang_Factory/</guid>
      <author>Mickaël Rémond</author>
      <description><![CDATA[<p>There have been two presentations from ProcessOne at Erlang Factory. Here are the slides of the presentations.  <p>The first presentation by me (Mickaël Rémond) was titled &#8220;OneTeam Media Server: Adding Video to Instant Messaging with Erlang&#8221;.</p>

<p align="center"><div style="width:425px;text-align:left" id="__ss_1661801"><a style="font:14px Helvetica,Arial,Sans-serif;display:block;margin:12px 0 3px 0;text-decoration:underline;" href="http://www.slideshare.net/mremond/oneteam-media-server-1661801?type=powerpoint" title="OneTeam Media Server">OneTeam Media Server</a>&lt;object style=&#8220;margin:0px&#8221; width=&#8220;425&#8221; height=&#8220;355&#8221;&gt;&lt;param name=&#8220;movie&#8221; value=&#8220;http://static.slidesharecdn.com/swf/ssplayer2.swf?doc=20090625oms-090630090201-phpapp01&amp;stripped_title=oneteam-media-server-1661801&#8221; /><param name="allowFullScreen" value="true"/><param name="allowScriptAccess" value="always"/>&lt;embed src=&#8220;http://static.slidesharecdn.com/swf/ssplayer2.swf?doc=20090625oms-090630090201-phpapp01&amp;stripped_title=oneteam-media-server-1661801&#8221; type=&#8220;application/x-shockwave-flash&#8221; allowscriptaccess=&#8220;always&#8221; allowfullscreen=&#8220;true&#8221; width=&#8220;425&#8221; height=&#8220;355&#8221;&gt;&lt;/embed>&lt;/object&gt;&lt;div style=&#8220;font-size:11px;font-family:tahoma,arial;height:26px;padding-top:2px;&#8220;>View more <a style="text-decoration:underline;" href="http://www.slideshare.net/">documents</a> from <a style="text-decoration:underline;" href="http://www.slideshare.net/mremond">Mickaël Rémond</a>.</div></div></p>

<p>The second presentation by Geoff Cant was title &#8220;Whitelabel Erlang&#8221; and give feedback on how Erlang can be used to write scalable hosted application for business.</p>

<p align="center"><div style="width:425px;text-align:left" id="__ss_1661842"><a style="font:14px Helvetica,Arial,Sans-serif;display:block;margin:12px 0 3px 0;text-decoration:underline;" href="http://www.slideshare.net/mremond/erlang-white-label?type=powerpoint" title="Erlang White Label">Erlang White Label</a>&lt;object style=&#8220;margin:0px&#8221; width=&#8220;425&#8221; height=&#8220;355&#8221;&gt;&lt;param name=&#8220;movie&#8221; value=&#8220;http://static.slidesharecdn.com/swf/ssplayer2.swf?doc=erlangwhitelabel-erlangfactorylondon2009-090630090959-phpapp01&amp;stripped_title=erlang-white-label&#8221; /><param name="allowFullScreen" value="true"/><param name="allowScriptAccess" value="always"/>&lt;embed src=&#8220;http://static.slidesharecdn.com/swf/ssplayer2.swf?doc=erlangwhitelabel-erlangfactorylondon2009-090630090959-phpapp01&amp;stripped_title=erlang-white-label&#8221; type=&#8220;application/x-shockwave-flash&#8221; allowscriptaccess=&#8220;always&#8221; allowfullscreen=&#8220;true&#8221; width=&#8220;425&#8221; height=&#8220;355&#8221;&gt;&lt;/embed>&lt;/object&gt;&lt;div style=&#8220;font-size:11px;font-family:tahoma,arial;height:26px;padding-top:2px;&#8220;>View more <a style="text-decoration:underline;" href="http://www.slideshare.net/">presentations</a> from <a style="text-decoration:underline;" href="http://www.slideshare.net/mremond">Mickaël Rémond</a>.</div></div></p> 
]]>
</description>
      <dc:subject>Companies, ProcessOne</dc:subject>
      <dc:date>2009-06-30T15:34:22+01:00</dc:date>
    </item>

    <item>
      <title>Content Editable</title>
      <link>http://www.planeterlang.org/en/planet/article/Content_Editable/</link>
      <guid>http://www.planeterlang.org/en/planet/article/Content_Editable/</guid>
      <author>noreply@blogger.com (Joe Armstrong)</author>
      <description><![CDATA[<p>I&#8217;ve been playing with the HTML contentEditable mode in Firefox.One word awesome.I quickly managed to put together the basis of a seamless editor. This is described in a seven part article.Part1 - toggling content editablePart2 - Adding some stylePart3 - Adding editing buttonsPart4 - A seamless structure editorPart5 - All the buttonsPart6 - Storing the results foreverPart7 - Integration with</p> 
]]>
</description>
      <dc:subject>Blogs, Joe Armstrong</dc:subject>
      <dc:date>2009-06-29T20:15:00+01:00</dc:date>
    </item>

    <item>
      <title>StackOverflow Podcast</title>
      <link>http://www.planeterlang.org/en/planet/article/StackOverflow_Podcast/</link>
      <guid>http://www.planeterlang.org/en/planet/article/StackOverflow_Podcast/</guid>
      <author>Damien Katz</author>
      <description><![CDATA[<p>Yesterday I did a StackOverflow podcast with Joel Spolsky and Jeff Atwood. We talked about CouchDB and Erlang, among other things:&nbsp; <a href="http://itc.conversationsnetwork.org/shows/detail4150.html">StackOverflow Episode 59</a></p> 
]]>
</description>
      <dc:subject>Blogs, Damien Katz</dc:subject>
      <dc:date>2009-06-24T21:22:56+01:00</dc:date>
    </item>

    <item>
      <title>11 June 2009: Get a 35% discount on the latest Erlang book</title>
      <link>http://www.planeterlang.org/en/planet/article/11_June_2009_Get_a_35_discount_on_the_latest_Erlang_book/</link>
      <guid>http://www.planeterlang.org/en/planet/article/11_June_2009_Get_a_35_discount_on_the_latest_Erlang_book/</guid>
      <author></author>
      <description><![CDATA[<p>Francesco Cesarini and Simon Thompson will be signing their new book <a href="http://oreilly.com/catalog/9780596518189/" target="_blank">Erlang Programming</a> at the Erlang Factory. Buy it on a day and get 35% discount off the cover price.</p> 
]]>
</description>
      <dc:subject>Companies, Erlang Training and Consulting</dc:subject>
      <dc:date>2009-06-24T19:15:12+01:00</dc:date>
    </item>

    <item>
      <title>making ejabberd log to (r)syslog w/ daemontools</title>
      <link>http://www.planeterlang.org/en/planet/article/making_ejabberd_log_to_rsyslog_w_daemontools/</link>
      <guid>http://www.planeterlang.org/en/planet/article/making_ejabberd_log_to_rsyslog_w_daemontools/</guid>
      <author></author>
      <description><![CDATA[<p>Having all logs in one place and a service which automatically is in charge of keeping a specific service running (e.g. ejabberd) is really nice to have. Forget about cronjobbed Scripts which check your service. daemontools is the one we use for this &#8220;always on&#8221; applications. You can download it <a rel="nofollow" title="Daemontools by DJ Bernstein" target="_blank" href="http://cr.yp.to/daemontools.html">here. </a></p>
<p><a rel="nofollow" title="Daemontools by DJ Bernstein" target="_blank" href="http://cr.yp.to/daemontools.html"></a>Installing daemontools is really simple on debian. You just create an Installation Script which sets up the files the supervise instance later uses to control your service. Save the following script to install_ejabberd_svc.sh and make it executable.</p>  <div class="wp_codebox"><table width="100%"><tr id="p2521"><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
</pre></td><td class="code" id="p252code1"><pre class="text" style="font-family:monospace;">#!/bin/bash
# v2009-04-09 tp@turtle-entertainment.de
# ejabberd and daemontools
#
echo STARTING EJABBERD WITH DAEMONTOOLS
# see
# http://cr.yp.to/daemontools/svc.html
# http://cr.yp.to/daemontools/softlimit.html
# http://www.kdegraaf.net/supervise.html
#
SERVICEDIR=&#8220;/etc/service&#8221;
SERVICE=&#8220;ejabberd
# No svc should be running, but to make sure we let it die first
svc -d ${SERVICEDIR}/${SERVICE} &amp;&gt; /dev/null
test -d &amp;&amp; rm -rf ${SERVICEDIR}/${SERVICE}
mkdir -p ${SERVICEDIR}/${SERVICE}
test -f &amp;&amp; rm -f ${SERVICEDIR}/${SERVICE}/run
test -f &amp;&amp; rm -f ${SERVICEDIR}/${SERVICE}/tmprun
cat &gt; ${SERVICEDIR}/${SERVICE}/tmprun &lt;&lt;EOF
#!/bin/sh
exec 2&gt;&amp;1
sleep 3
exec /opt/ejabberd/server/sbin/ejabberdctl start
EOF
chmod 755 ${SERVICEDIR}/${SERVICE}/tmprun
mv -f ${SERVICEDIR}/${SERVICE}/tmprun ${SERVICEDIR}/${SERVICE}/run
# Create log Pipe
mkdir -p ${SERVICEDIR}/${SERVICE}/log
chmod 1755 ${SERVICEDIR}/${SERVICE}/log
test -f &amp;&amp; rm -f ${SERVICEDIR}/${SERVICE}/log/run
test -f &amp;&amp; rm -f ${SERVICEDIR}/${SERVICE}/log/tmprun
cat &gt; ${SERVICEDIR}/${SERVICE}/log/tmprun &lt;&lt;EOF
#!/bin/sh
exec env - PATH=&#8220;/usr/bin&#8221; logger -p local5.err -t EJABBERD
EOF
chmod 755 ${SERVICEDIR}/${SERVICE}/log/tmprun
mv -f ${SERVICEDIR}/${SERVICE}/log/tmprun ${SERVICEDIR}/${SERVICE}/log/run</pre></td></tr></table></div>  <p>Now you just need to run this script and install the daemontools-run package under debian. This automatically uses the just created structure and starts ejabberd with logging stdout to logger. Keep in mind that every programm you run under daemontools must run in foreground.</p>  <div class="wp_codebox"><table width="100%"><tr id="p2522"><td class="line_numbers"><pre>1
</pre></td><td class="code" id="p252code2"><pre class="text" style="font-family:monospace;">aptitude install daemontools-run</pre></td></tr></table></div>  <p>Thats it!</p>
<p>If you want to use rsyslog just setup your rsyslog.conf for redirecting local5.err to your rsyslogserver</p>  <div class="wp_codebox"><table width="100%"><tr id="p2523"><td class="line_numbers"><pre>1
</pre></td><td class="code" id="p252code3"><pre class="text" style="font-family:monospace;">local5.err @10.10.0.99:514</pre></td></tr></table></div> <img src="http://feeds.feedburner.com/~r/EslDeveloperBlog/~4/-WO0MfD101o" height="1" width="1"/> 
]]>
</description>
      <dc:subject>Blogs, ESL Developer Blog</dc:subject>
      <dc:date>2009-06-24T14:54:22+01:00</dc:date>
    </item>

    <item>
      <title>Datamonitor coverage</title>
      <link>http://www.planeterlang.org/en/planet/article/Datamonitor_coverage/</link>
      <guid>http://www.planeterlang.org/en/planet/article/Datamonitor_coverage/</guid>
      <author>Mickaël Rémond</author>
      <description><![CDATA[<p>Mickaël Rémond, CEO of ProcessOne, was covered by a Datamonitor study: &#8220;<a href="http://www.datamonitor.com/store/Product/ceo_viewpoint_social_networks_mobility_market_opportunity_analyst_opinion?productid=BFTC2407" title="CEO Viewpoint: Social Networks Mobility = Market Opportunity">CEO Viewpoint: Social Networks Mobility = Market Opportunity</a>&#8220;.</p>  <p>In this Analyst Opinion series by Daniel Okubo, it is observed that social networks and mobile network operators are currently deploying IM and presence features based on XMPP.</p>

<p>In a competitive and recessive context, the leaders and newcomers look to differentiate in order to increase their market shares. Real time communication based on open standard like XMPP has proven a good way to value existing users base.</p>

<p>This document is available at Datamonitor ResearchStore, at the price of $150, or $375 for a multi-user license. ProcessOne is not affiliated with DataMonitor and does not earn any commission on sales of this document, but we thought it could be usefull to know for customers interested in ProcessOne.</p> 
]]>
</description>
      <dc:subject>Companies, ProcessOne</dc:subject>
      <dc:date>2009-06-23T17:44:51+01:00</dc:date>
    </item>

    <item>
      <title>EU Summer Tour</title>
      <link>http://www.planeterlang.org/en/planet/article/EU_Summer_Tour/</link>
      <guid>http://www.planeterlang.org/en/planet/article/EU_Summer_Tour/</guid>
      <author>jan@apache.org (Jan)</author>
      <description><![CDATA[<p>After the <a rel="nofollow" target="_blank" href="http://jan.prima.de/~jan/plok/archives/170-CouchDB-US-Spring-Tour.html">US Spring Tour in April</a> this year, I&#8217;m about to embark on the EU Summer Tour.</p>  <p>I&#8217;ll be visiting London, Amsterdam, Zurich and the Gran Canaria. Here&#8217;s when, how and why:</p>  <p><em>June 22nd–26th:</em> CouchDB University &amp; Factory, London</p>  <p>The <a rel="nofollow" target="_blank" href="http://www.erlang-factory.com/conference/London2009/university/CouchDB">CouchDB University</a> is a a <a rel="nofollow" target="_blank" href="http://couchio.com/courses">three day training course</a> where <a rel="nofollow">J Chris</a> and I teach a select group of students everything about CouchDB. With little prior knowledge, we&#8217;ll leave you with being able to build amazing CouchDB applications at small and large scale as well as extend CouchDB itself.</p>  <p>The <a rel="nofollow" target="_blank" href="http://www.erlang-factory.com/conference/London2009/tracks/CouchDB">CouchDB Factory</a> is a track at the Erlang Factory running all day Friday.</p>  <hr />  <p><em>June 29th–30th:</em> Kings of Code, Amsterdam</p>  <p><a rel="nofollow" target="_blank" href="http://kingsofcode.nl/">Kings of Code</a> looks like it is going to be a kick-ass web developer conference featuring some of my favourite web people: <a rel="nofollow" target="_blank" href="http://peepcode.com/">Geoffrey Grosenbach</a> <a rel="nofollow" target="_blank" href="http://www.joestump.net/">Joe Stump</a> &amp; <a rel="nofollow" target="_blank" href="http://280north.com/">Francisco Tolmasky</a>. I&#8217;m fairly confident that the other speakers will be among my favourites <em>after</em> Kings of Code :)</p>  <p>J Chris will be talking about CouchDB.</p>  <p>It&#8217;s still in discussion, but I might talk about CouchDB and Erlang for web developers on one of the <a rel="nofollow" target="_blank" href="http://kingsofcode.nl/pages/side-events">side events</a>.</p>  <hr />  <p><em>July 1st–2nd:</em> ICOODB, Zurich</p>  <p>I&#8217;ll be taking the night train from Amsterdam zu Zurich to give a three hour tutorial as well as a 60 minute presentation on CouchDB at the <a rel="nofollow" target="_blank" href="http://www.icoodb2009.org/">International Conference on Object Databases</a>. CouchDB is strictly not an object oriented database, but it stores objects and is of interest to the research community that meets in Zurich.</p>  <p><a rel="nofollow" target="_blank" href="http://prof.beuth-hochschule.de/edlich/">Prof. Stefan Edlich</a> invited me to speak at ICOODB and I&#8217;m very happy I can make it.</p>  <hr />  <p><em>July 1st–7th:</em> GUADEC, Gran Canaria</p>  <p><a rel="nofollow" target="_blank" href="http://www.canonical.com/">Canonical</a>, the kind folks behind the Ubuntu Linux distribution are pushing CouchDB to become a centerpiece of the Ubuntu desktop data synchronization infrastructure. Merrily sync your contacts, calendar data between your machines, an online backup service and share select data with your peers. And yeah <a rel="nofollow" target="_blank" href="https://ubuntuone.com/">UbuntuOne</a> is also related :)</p>  <p>Canonical is flying me out to attend the <a rel="nofollow" target="_blank" href="http://www.grancanariadesktopsummit.org/">Linux Desktop Summit</a> to talk to desktop application developers and show them how cool CouchDB is and where it is useful for them.</p>  <p>Also, <a rel="nofollow" target="_blank" href="http://en.wikipedia.org/wiki/Gran_Canaria">Gran Canria</a>, I couldn&#8217;t say no. Thank you Canonical!</p>  <hr />  <p>As much as I am excited about the travels and meeting all you out there, I&#8217;ll be missing three weeks in my favourite city, Berlin and it makes me a little sad.</p> 
]]>
</description>
      <dc:subject>Blogs, Jan Lehnardt</dc:subject>
      <dc:date>2009-06-20T14:09:47+01:00</dc:date>
    </item>

    <item>
      <title>Win32 Linked&#45;In Drivers and A Project Idea</title>
      <link>http://www.planeterlang.org/en/planet/article/Win32_Linked-In_Drivers_and_A_Project_Idea/</link>
      <guid>http://www.planeterlang.org/en/planet/article/Win32_Linked-In_Drivers_and_A_Project_Idea/</guid>
      <author>kevin</author>
      <description><![CDATA[<p>I&#8217;ve been living in linked-in driver land for the past few weeks. I guess that&#8217;s what I get for publishing <a href="http://github.com/kevsmith/basic_erl_driver/tree/master">basic_erl_driver</a>. It&#8217;s been interesting work so I certainly haven&#8217;t minded doing it.</p>
<p>Well, I didn&#8217;t mind it until I had to build one of my drivers on Windows. It&#8217;s been a long time since I&#8217;ve done much Win32 development but I used to know my way around Visual C++ pretty well. &#8220;I used to do this shit for a living. How hard could this be?&#8221;, I thought to myself.</p>
<p>Three words: famous last words.</p>
<p>Three more words: C++, linker, XML.</p>
<p>Two final words: sheer frustration.</p>
<p>After wrestling with Visual Studio Express C++ Edition 9.0 (or whatever crazy name MS uses) for a day and a half I finally have a working driver. Here&#8217;s the nuggets o&#8217; knowledge I learned along the way. These notes assume you&#8217;re porting a working driver from OS X/Linux/BSD to Windows although most of them are applicable if you&#8217;re starting from scratch on Windows, too. They also assume you&#8217;re building code from inside of Visual Studio because, frankly, I don&#8217;t care enough about Windows to figure out nmake, too.</p>
<ul>
<li>Start with a blank Win32 DLL project. Don&#8217;t let Visual Studio create stdafx and friends. Down that path lies madness. You&#8217;re much better off to create a blank project and import your code.</li>
<li>Add the erts-&lt;version_number&gt;/include directory to your project&#8217;s include path. You&#8217;ll need this so the compiler can resolve <code>erl_driver.h</code>.</li>
<li>Don&#8217;t forget to include <code>string.h</code> before <code>erl_driver.h</code>. <code>erl_driver.h</code> uses <code>memcpy()</code> without including <code>string.h</code>. Including <code>string.h</code> first will fix a compiler warning and a possible runtime crash.</li>
<li><strong>Very Important:</strong> Right-click your project and navigate to the Linker -&gt; Manifest File option.&nbsp; Enter this magical text into the Additional Manifest Dependencies field:
<pre>
type=&#8216;win32&#8217; name=&#8216;Microsoft.VC90.CRT&#8217; version=&#8216;9.0.21022.8&#8217; processArchitecture=&#8216;x86&#8217; publicKeyToken=&#8216;1fc8b3b9a1e183b&#8217;
</pre>
<p>I believe this tells the compiler to link the DLL with the Visual C++ 9.0 runtime. This is the equivalent of the C stdlib on other platforms, I think. <strong>Erlang will be unable to load your driver if you skip this step.</strong></li>
<hr />
<em>Observation: Who in their right fucking mind thought it was a good idea to add XML descriptors to the link step of building a C library?! I take back every bad thing I&#8217;ve ever said about Java&#8217;s use of XML. SOAP, with all of its angle brackety warts, almost looks sane in comparison.</em></p>
<hr />
<li><p>With the previous step accomplished you&#8217;ll need to distribute the VC++ runtime with your driver. Luckily, MS provides the code in a redistributable form here inside the <code>Microsoft Visual Studio 9.0VCredistx86</code> directory structure. Grab all of the files in there and plop them into the same directory as your driver&#8217;s DLL file.
</p></ul>
<p>There are probably better ways to accomplish the same goal given my dated platform knowledge. If you know of a better way to do this, please drop a comment and set me straight!</p>
<p>One of the drivers I&#8217;ve been working on is to allow <a href="http://www.mozilla.org/js/spidermonkey/">SpiderMonkey</a> to interface with Erlang. I&#8217;ve asked and am waiting for permission from my client to open source the code since I think it&#8217;d be generally useful. If that doesn&#8217;t pan out I&#8217;m strongly considering doing another driver &#8212; open source from the beginning &#8212; to interface with <a href="http://code.google.com/p/v8/">V8</a> or possibly WebKit&#8217;s <a href="http://webkit.org/projects/javascript/index.html">engine</a>. I&#8217;ve got some ideas on how JSON could smooth the interop between the two languages. Anyone up for either working on or sponsoring work on this?</p> 
]]>
</description>
      <dc:subject>Blogs, Hypothetical Labs</dc:subject>
      <dc:date>2009-06-19T03:47:16+01:00</dc:date>
    </item>

    <item>
      <title>Erlang Plugin Version 1 for NetBeans 6.7 Released</title>
      <link>http://www.planeterlang.org/en/planet/article/Erlang_Plugin_Version_1_for_NetBeans_6.7_Released/</link>
      <guid>http://www.planeterlang.org/en/planet/article/Erlang_Plugin_Version_1_for_NetBeans_6.7_Released/</guid>
      <author></author>
      <description><![CDATA[<p>
I&#8217;m pleased to announce Erlang plugin (ErlyBird) version 1 for NetBeans 6.7 is released.
<p>
<b>NetBeans 6.7 RC3 or above is a requirement.</b>
<p>
What&#8217;s new:
<ul>
<li>It&#8217;s rewritten in Scala instead of Java</li>
<li>More reliable instant rename</li>
<li>Display extracted document information from source comment when doing auto-completion.</li>
</ul>
<p>
To download, please go to: <a rel="nofollow" target="_blank" href="https://sourceforge.net/project/showfiles.php?group_id=192439&amp;package_id=226387">https://sourceforge.net/project/showfiles.php?group_id=192439&amp;package_id=226387</a>
<p>
To install:
<ul>
<li>Open NetBeans, go to &#8220;Tools&#8221; -&gt; &#8220;Plugins&#8221;, click on &#8220;Downloaded&#8221; tab title, click on &#8220;Add Plugins&#8230;&#8220; button, choose the directory where the Erlang plugin are unzipped, select all listed *.nbm files, following the instructions.</li>
<li>Make sure your Erlang bin path is under OS environment PATH, you can also check/set your OTP path: From [Tools]-&gt;[Options], click on &#8216;Miscellanous&#8217;, then expand &#8216;Erlang Installation&#8217;, fill in the full path of your &#8216;erl.exe&#8217; or &#8216;erl&#8217; file. For instance: &#8220;C:/erl/bin/erl.exe&#8221;
<li>When you open/create an Erlang project first time, the OTP libs will be indexed. Take a coffee and wait, the indexing time varies from 10 to 30 minutes depending on your computer.</li>
</ul><p>
Feedback and bug reports are welcome.
</p><p> 
]]>
</description>
      <dc:subject>Blogs, Caoyuan Blog</dc:subject>
      <dc:date>2009-06-17T17:08:13+01:00</dc:date>
    </item>

    <item>
      <title>Webmachine Bloggy Goodness</title>
      <link>http://www.planeterlang.org/en/planet/article/Webmachine_Bloggy_Goodness/</link>
      <guid>http://www.planeterlang.org/en/planet/article/Webmachine_Bloggy_Goodness/</guid>
      <author></author>
      <description><![CDATA[<p>Webmachine (and Erlang use in general) is picking up. If you&#8217;re looking for a few more people to follow in relation to webmachine, I have some suggestions.<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.beerriot.com&amp;blog=1135025&amp;post=185&amp;subd=beerriot&ref;=&amp;feed=1"/></p> 
]]>
</description>
      <dc:subject>Blogs, BeerRiot Blog</dc:subject>
      <dc:date>2009-06-17T16:18:24+01:00</dc:date>
    </item>

    <item>
      <title>[rabbitmq&#45;announce] RabbitMQ 1.6.0 release</title>
      <link>http://www.planeterlang.org/en/planet/article/rabbitmq-announce_RabbitMQ_1.6.0_release/</link>
      <guid>http://www.planeterlang.org/en/planet/article/rabbitmq-announce_RabbitMQ_1.6.0_release/</guid>
      <author>Matthias Radestock</author>
      <description><![CDATA[ 
]]>
</description>
      <dc:subject>Software, RabbitMQ Announce</dc:subject>
      <dc:date>2009-06-17T00:00:00+01:00</dc:date>
    </item>

    <item>
      <title>Caveats of Evaluating Databases</title>
      <link>http://www.planeterlang.org/en/planet/article/Caveats_of_Evaluating_Databases/</link>
      <guid>http://www.planeterlang.org/en/planet/article/Caveats_of_Evaluating_Databases/</guid>
      <author>jan@apache.org (Jan)</author>
      <description><![CDATA[<p>This is part two in a small series about measuring software performance. There&#8217;s a lot of common sense covered, but I feel it necessary to shed some light.</p>  <p>If you haven&#8217;t, check out <a rel="nofollow" target="_blank" href="http://jan.prima.de/~jan/plok/archives/175-Benchmarks-You-are-Doing-it-Wrong.html">part one</a>.</p>  <hr />  <p>Say you want to find out what&#8217;s behind the buzz of all these new <a rel="nofollow" target="_blank" href="http://blog.oskarsson.nu/2009/06/nosql-debrief.html">#nosql</a> databases. There&#8217;s a large number to choose from today. All options come in varying degrees of maturity and characteristics so it&#8217;d be nice to know what solves your problem best. A non inclusive list of these databases or storage systems include <a rel="nofollow" target="_blank" href="http://www.danga.com/memcached/">Memcache</a><a rel="nofollow" target="_blank" href="http://memcachedb.org/">[DB]</a>, <a rel="nofollow" target="_blank" href="http://tokyocabinet.sourceforge.net/">Tokyo Cabinet</a> / <a rel="nofollow" target="_blank" href="http://tokyocabinet.sourceforge.net/tyrantdoc/">Tyrant</a>, <a rel="nofollow" target="_blank" href="http://project-voldemort.com/">Project Voldemort</a>, <a rel="nofollow" target="_blank" href="http://code.google.com/p/scalaris/">Scalaris</a>, <a rel="nofollow" target="_blank" href="http://github.com/cliffmoon/dynomite/tree/master">Dynamite</a>, <a rel="nofollow" target="_blank" href="http://code.google.com/p/redis/">Redis</a>, <a rel="nofollow" target="_blank" href="http://www.persvr.org/">Persevere</a>, <a rel="nofollow" target="_blank" href="http://www.mongodb.org/">MongoDB</a>, <a rel="nofollow" target="_blank" href="http://lucene.apache.org/solr/">Solr</a> or my favourite <a rel="nofollow" target="_blank" href="http://couchdb.apache.org/">CouchDB</a>. And these are just some of the open source ones.</p>  <p>This article is <em>not</em> a comprehensive comparison of any of the mentioned systems. Instead it tries to give you an idea about what to look for when evaluating a storage system or how to take into perspective evaluations and benchmarks others have done.</p>  <p>We&#8217;ll look at some of the technical aspects of data storage systems: Applying common sense when reading benchmarks; b-trees and hashing; speed vs. concurrency; networked systems and their problems; low level data storage (disks&#8217;n stuff); and data reliability on single-nodes and multi-node systems.</p>  <p>There are a lot of other reasons to decide for or against a project based on a lot of non-technical criteria, but things like commercial support or a healthy open source community are not part of this article.</p>  <h5>Astounding Numbers</h5>  <p>From time to time you see some crazy numbers posted to the reddits of the internets that claim fantastic performance. </p>  <blockquote><p> </p><p>“The (imaginary) SuperfastDB can store 450,000 items per second!”.</p>
</blockquote>  <p>Wow.</p>  <p>No word on where the items are stored (in memory? on a harddrive? Spindles? Solid State?), what an <em>item</em> is exactly and how big it is, the rest of the hardware this was run on and how to reproduce it.</p>  <p>But boy, 450,000 a second!</p>  <p>My shoes can do 650,000 a second, but you&#8217;ve got to figure out what.</p>  <p>Context is as important as reproducibility. The <a rel="nofollow" target="_blank" href="http://jan.prima.de/~jan/plok/archives/175-Benchmarks-You-are-Doing-it-Wrong.html#variables">last article</a> here established that finding out that my system and your system come up with different numbers is not much of a help. Any sort of serious test must come with a set of scripts or programs and comprehensive instructions on how the tests were run.</p>  <hr />  <p>Everything “cool” in computer science has been around for 25+ years. Actual innovation is rare. Advancements in hardware and new combinations of existing solutions make for new stuff coming out each day (that&#8217;s a good thing), but the fundamental rules are the same for all. We&#8217;re all running <a rel="nofollow" target="_blank" href="http://en.wikipedia.org/wiki/Von_Neumann_architecture">von Neumann</a> machines, <a rel="nofollow" target="_blank" href="http://en.wikipedia.org/wiki/Quicksort">quicksort</a> is still pretty quick and <a rel="nofollow" target="_blank" href="http://en.wikipedia.org/wiki/Hash_function">hashes</a> and <a rel="nofollow" target="_blank" href="http://en.wikipedia.org/wiki/B-tree">b-trees</a> rule the storage world.</p>  <p>Let&#8217;s recap.</p>  <h5>Hashes &amp; Trees</h5>  <p>Hashing revolves around the idea of <a rel="nofollow" target="_blank" href="http://en.wikipedia.org/wiki/Big_O_notation"><code>O(1)</code></a> lookups. Allocate a number of buckets, create a function that gives you a number of a bucket for any data item you might want to store, make sure no two data items hit the same bucket (or work around that). Runtime characteristics include that you only need to ask your function where to look for or store your data and the allocation of your set of buckets: If you need to store more items than you have buckets, some more work is required which gives you O(N)` operations that you can&#8217;t ignore in practice.</p>  <div style="text-align:center;"><a rel="nofollow" target="_blank" href="http://en.wikipedia.org/wiki/File:Hash_table_4_1_0_0_0_0_0_LL.svg"><img src="http://jan.prima.de/~jan/plok/uploads/D5563B63-7B48-4280-A31F-EDB37DB78416.jpg" alt="D5563B63-7B48-4280-A31F-EDB37DB78416.jpg" border="0" width="240" height="168"/></a></div>  <p>The other elephant in the room are <a rel="nofollow" target="_blank" href="http://en.wikipedia.org/wiki/B-tree">b-trees</a>. The fundamental idea here is to get to your data in a minimal number of steps traversing a tree because making a step is expensive, but reading your data is very fast comparatively. Steps are expensive because they translate to a head seek (that is the time your spinning hard drive needs to position the reading arm to find the spot to read your data from), but reading from a harddrive once the reading head is in place is fast.</p>  <div style="text-align:center;"><a rel="nofollow" target="_blank" href="http://www.scholarpedia.org/article/Image:Btree-Insert-Fig2.GIF"><img src="http://jan.prima.de/~jan/plok/uploads/6720EE64-4DFC-4298-B3BA-0145746C6523.jpg" alt="6720EE64-4DFC-4298-B3BA-0145746C6523.jpg" border="0" width="400" height="158"/></a></div>  <p>There are a bunch of more interesting lookup structure like <a rel="nofollow" target="_blank" href="http://en.wikipedia.org/wiki/R-tree">R-Trees</a> for spacial queries, but they are mostly used for secondary indexes on top a regular data set that lives in a hash or b-tree.</p>  <h5>Concurrency vs. Speed</h5>  <p>Concurrency is hard. The devil lies in the details and when briefly looking at things, the details are often overlooked. Suites the devil.</p>  <p>Creating storage systems that assume only one access occurs at a time is relatively easy. If resources are shared concurrently, things become tricky. The two larger schools of thought (and practice) are locking and no-locking (heh).</p>  <p>Locking means that the database has to maintain information for everybody who wants to write to a part of the database, and what part it is.</p>  <p>No locking, or <a rel="nofollow" target="_blank" href="http://en.wikipedia.org/wiki/Optimistic_concurrency_control">optimistic locking</a> or <a rel="nofollow" target="_blank" href="http://en.wikipedia.org/wiki/Multiversion_concurrency_control">MVCC</a> moves that burden to the person who is trying to write to the database. She must prove that she won&#8217;t be overwriting any existing data.</p>  <p>The <a rel="nofollow" target="_blank" href="http://jan.prima.de/~jan/plok/archives/175-Benchmarks-You-are-Doing-it-Wrong.html#trade-offs">trade-offs</a> here are a leaner request handing on the server that works well with remote &amp; concurrent clients at the expense of more complexity on the client (the person who wants to store something in our database).</p>  <p>Hybrid approaches are possible too: While MVCC is used internally, the database&#8217;s clients can rely on database-side locking (e.g. <a rel="nofollow" target="_blank" href="http://postgresql.org/">PostgreSQL</a> or <a rel="nofollow" target="_blank" href="http://www.mysqlperformanceblog.com/?s=innodb+mvcc+storage">InnoDB</a>).</p>  <h5>Networks</h5>  <p>Just a quick note: We already talk about <em>client</em> and <em>server</em> here. There is a strong case for embedded databases like <a rel="nofollow" target="_blank" href="http://www.sqlite.org/">SQLite</a> that don&#8217;t expose a concurrent user model to the outside. The program that needs an embedded database just includes it.</p>  <p>Another approach to using databases is having a dedicated computer running a database system and sharing it over the network with any number of <em>clients</em> using this database <em>server</em>. They can often be “a bunch of servers” or a <em>cluster</em>. More on that later.</p>  <p>A separate database server (networked or not) will need to spend some time to deal with connections, network failures, unspecified client behaviour and so on. The upside is a piece of infrastructure that can be maintained separately. An embedded database will thus be faster but probably won&#8217;t solve all of your problems and it will always be tied to your application.</p>  <h5>fsync(): Reliability vs. Speed</h5>  <p>When people tell me “SuperfastDB does 450,000 a second!” I ask “How many <code>fsync()</code>s is that?”. Let me explain:</p>  <p>A database system uses operating system services to use any hardware. The operating systems exposes a harddrive through a filesystem. The database systems talks to the filesystem and asks it to store or retrieve data in its behalf. The filesystem then goes ahead and tries to satisfy the database&#8217;s requests. </p>  <p>(I&#8217;ll not talk about databases that can use raw block devices to store data. They exist but they are not as common as those who use the filsystem.)</p>  <p>The filesystem also tries to be clever – for good reasons. When the database requests a piece of data, the filesystem will not only find that piece and return it, it will also store it in a <em>cache</em> to avoid having to actually talk to the harddrive the next time this piece of data gets requested. When the data changes, the filesystem either removes it from the cache or updates it with the harddrive. It might even go further and only store the new data that comes in with a write request into the cache and rely on a periodic task to write all of the cache back to the drive. Writing a bunch of of pieces at once is more efficient than storing each one on its own.</p>  <p>More efficient equals to faster and faster is good, right? Well, it depends: If all goes well, this approach is a nice one. But you know computers, things will not go well 100% of the time. The failure scenarios are endless, but they boil down to the question: “What happens when your machine dies and you have data that has only been written to memory?” — The answer isn&#8217;t too hard: That data is lost. If there is a delay between a write request finishing and data being written (or “flushed”) to disk any data that has been “written” during the delay period is subject to lost.</p>  <p>There are cases where this is not a problem; in other cases it is. A developer should have the chance to decide. (Note that even your hardware could be lying to you about having stored data, but I&#8217;ll punt on this one, get proper hardware).</p>  <p>So, flushing to disk needs to happen before you can rest assured your data has been stored. Your operating system has an API call that forces the filesystem to write its cache to disk. It is called <code>fsync()</code> (on UNIX systems) and it is an expensive operation. You can only do so many <code>fsync()</code>s in a second and it is not a great many.</p>  <p>The 450,000 items were most likely just written to memory and not to disk.</p>  <h5>Space &amp; In-Place</h5>  <p>When writing files to disk (at the end of the day, your data ends up in one file or another on the filesystem) that represents what lives in a database, there are multiple options to handle <em>updates</em>.</p>  <p>An update is a change to your data item, for example, a new phone number. The intuitive way to handle this is to go and find the old phone number in the file, and overwrite it with the new number. Easy.</p>  <p>There are several problems with this approach: What to do if the new phone number is longer than the old one (say you added an international calling prefix)? The new number needs to be written to a different place and the change in location must be recorded. Not too big of an issue.</p>  <p>Back to failure scenarios: Again, the reasons can be manifold, but what happens when we&#8217;ve (over-)written the first 4 digits of the old with the new number and then the server dies, power goes away or the database server crashes? The next time you want to read the phone number you get a mix of the old and the new one (if you are lucky) and you don&#8217;t exactly know that this is the case and which parts are missing. Your database file is <em>inconsistent</em> and you need to run a <em>integrity check</em> to find missing bits and correct half-written bytes. In the worst case that means scanning your entire database file a few times before you resolved all inconstancies. If you have a lot of data, that can take <em>days</em>.</p>  <p>To solve this, you always write the new phone number to a new place in the database file and only when it has been <code>fsync()</code>ed to disk, you update the location of the phone number (and then flush that update to disk as well). You will never end up in a scenario where your database file can end up an inconsistent state and after a crash you are back online without an integrity check.</p>  <p>The trade-off for consistency is write-speed (remember <code>fsync()</code>s are expensive) for consistency-check-speed after a failure.</p>  <p>A nice bonus is that if the “new place in the database” is the end of the file, you keep your disk-drive head busy with writing data to disk instead of seeking all over the place (remember: seeks are expensive).</p>  <h5>Distribution, Sharding &amp; Resharding</h5>  <p>So far, we&#8217;ve been looking at scenarios that involve a single database. We learned a great deal (I hope), but in reality we often deal with more than one database. The simplest reason to have two databases is for redundancy. Failures can bring down your database temporarily or even permanently. If it is a temporary issue, waiting a bit (or a bit longer) to get up and running again might be an option, but often, an application or service should be available at all times. A fatal failure where a database server is lost beyond repair, your data is gone if you haven&#8217;t stored it in a second place.</p>  <p>“I&#8217;ll just make two copies, easy!”. Yup easy, until you look at the details (that damn devil again!). </p>  <p>It&#8217;s all about failures again. Consider a single read request. A client connects to a server and asks for a data item. The server looks it up and returns the data to the client. All is well. At any point things can go wrong. The network connection can drop (or slow down so much that client or server assume it dropped), the client can disappear (because of a network failure or crash) as can the server. Clients, servers and the protocols they speak need to be built around the assumption that any of these things (and many more) can go wrong. If any parts is not designed to handle error cases, your system will do funny things, but it won&#8217;t reliably store and manage your data.</p>  <p>Add complexity: With each write target (store in two places) the possibility of error and the need for proper error handling <a rel="nofollow" target="_blank" href="http://en.wikipedia.org/wiki/Metcalfe's_law">grows exponentially</a>. When evaluating a distributed storage system, looking at how errors are handled is vital.</p>  <hr />  <p>Another reason to distribute data among multiple servers is capacity. The three metrics of interest here are <em>read requests</em>, <em>write requests</em> and <em>data</em>. If you have more requests or data than a single machine can handle, you need to move to multiple machines. Each metric calls for different strategies, but they often go along with each other. The need for fault tolerance that I discussed above needs to be considered alongside.</p>  <p>Growing read capacity is relatively easy once you covered the base case where the source for reading data might not be the same as the the target for writing data and that there can be a mismatch (cf. <a rel="nofollow" target="_blank" href="http://www.allthingsdistributed.com/2007/12/eventually_consistent.html">eventual consistency</a>).</p>  <p>Distributing writes and data works by designating two machines with 50% of the operations. A clever intermediate, a proxy server for example, decides which request goes where and all is well, we can store twice as much and we can store at twice the speed. When we need to grow bigger yet, we add another server and tell the proxy server to distribute the load equally among them. Adding a proxy for distribution introduces a single point of failure and you don&#8217;t want these; there&#8217;s added complexity with this approach.</p>  <div style="text-align:center;"><img src="http://jan.prima.de/~jan/plok/uploads/resharding.png" alt="resharding.png" border="0" width="477" height="522"/></div>  <p>The diagram shows that there is another step needed that wasn&#8217;t included in the above description. The new “node” needs to have a copy of all data items that are assigned to him and are currently living on the two existing nodes. The process of moving data items to new nodes is called <em>resharding</em> and needs to happen every time a new node is added.</p>  <p>Resharding can be an expensive operation if you have a lot of data. Techniques like <a rel="nofollow" target="_blank" href="http://en.wikipedia.org/wiki/Consistent_hashing">consistent hashing</a> help with minimising the amount of items that need to move. If you are looking at a sharding database, you want to understand how the sharding is performed and if you like the trade-offs.</p>  <h5>CAP Theorem</h5>  <p>The <a rel="nofollow" target="_blank" href="http://citeseer.ist.psu.edu/544596.html">CAP Theorem</a> states that out of <em>consistency</em>, <em>availability</em> and <em>partition tolerance</em>, a system can choose to support two at any given moment, but never three.</p>  <div style="text-align:center;"><img src="http://jan.prima.de/~jan/plok/uploads/cap.png" alt="cap.png" border="0" width="407" height="415"/></div>  <p><em>Consistency</em> guarantees that all clients that talk to cluster of nodes will always get to read the same data. Write operations are <em>atomic</em> on all nodes.</p>  <p><em>Availability</em> guarantees that in any (reasonable) failure scenario, clients are still able to access their data.</p>  <p><em>Partition tolerance</em> guarantees that when nodes in the cluster lose their network connection and two or more completely separated sub-clusters emerge, the system will still be able to store and retrieve data.</p>  <h5>Please Talk! (To Developers)</h5>  <p>If you are aiming for a comparative benchmark of two or more systems, you should run your procedure by they authors. I found developers are happy to help out with benchmarks by clearing up misconceptions or sharing tricks to speed things up (which you can choose to ignore, if you are looking for out-of-the box comparison, but this is rarely useful).</p> 
]]>
</description>
      <dc:subject>Blogs, Jan Lehnardt</dc:subject>
      <dc:date>2009-06-16T23:57:40+01:00</dc:date>
    </item>

    <item>
      <title>Senior Erlang Developer, London, UK, permanent position</title>
      <link>http://www.planeterlang.org/en/planet/article/Senior_Erlang_Developer_London_UK_permanent_position/</link>
      <guid>http://www.planeterlang.org/en/planet/article/Senior_Erlang_Developer_London_UK_permanent_position/</guid>
      <author>Erlang Training and Consulting</author>
      <description><![CDATA[<p>Gambit Research is a West London software company developing market
</p><br/><p>information and trading software for the betting industry.
</p><br/>
<br/><p>We are looking to hire an experienced Erlang developer to work on extending and
</p><br/><p>improving an existing trading system.&nbsp; This role will involve working as part
</p><br/><p>of a small team of Erlang developers and working closely with Python developers
</p><br/><p>and the trading team.
</p><br/>
<br/><p>You should have experience of developing reliable, fault tolerant
</p><br/><p>applications in
</p><br/><p>Erlang.&nbsp; Experience with UNIX, networking, PostgreSQL and Python would also be
</p><br/><p>highly desirable.
</p><br/>
<br/><p>* Starting salary £30,000 plus, depending on experience.
</p><br/><p>* 25 days holiday per year.
</p><br/><p>* Discretionary bonus scheme.
</p><br/><p>* Flexible working hours.
</p><br/>* Relaxed and informal working environment. 
]]>
</description>
      <dc:subject>Companies, Erlang Training and Consulting</dc:subject>
      <dc:date>2009-06-16T01:59:59+01:00</dc:date>
    </item>

    <item>
      <title>Webmachine 1.3: streamed bodies, multipart forms, and efficiency</title>
      <link>http://www.planeterlang.org/en/planet/article/Webmachine_1.3_streamed_bodies_multipart_forms_and_efficiency/</link>
      <guid>http://www.planeterlang.org/en/planet/article/Webmachine_1.3_streamed_bodies_multipart_forms_and_efficiency/</guid>
      <author>Justin Sheehy</author>
      <description><![CDATA[<p>Easily the most requested feature for Webmachine since its release has been the ability to &#8220;stream&#8221; the request and/or response bodies, instead of having to receive or send them in one potentially-large hunk.&nbsp; As of the most recent version, this feature is now available.&nbsp; See the <a href="http://bitbucket.org/justin/webmachine/wiki/StreamBody">wiki page</a> for details on the API.<br /><br />A number of other changes are also in, such as multipart form parsing, improved efficiency by changing a gen_server (per request) into a parameterized module, and so on&#8230; but I suspect that the streamed bodies are what people are really looking for most.&nbsp; Enjoy!<br /><p><div class="blogger-post-footer"><img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6703975492853493573-8260005521063889033?l=blog.therestfulway.com'/></div></p> 
]]>
</description>
      <dc:subject>Blogs, Justin Sheehy</dc:subject>
      <dc:date>2009-06-15T20:23:00+01:00</dc:date>
    </item>

    <item>
      <title>How to Crash Erlang</title>
      <link>http://www.planeterlang.org/en/planet/article/How_to_Crash_Erlang/</link>
      <guid>http://www.planeterlang.org/en/planet/article/How_to_Crash_Erlang/</guid>
      <author>James Hague</author>
      <description><![CDATA[<p>Now that&#8217;s a loaded title, and I know some people will immediately see it as a personal slam on Erlang or ammunition for berating the language in various forums.&nbsp; I mean neither of these.&nbsp; Crashing a particular language, even so-called safe interpreted implementations, is not particularly challenging.&nbsp; Running out of memory or stack space are two easy options that work for most languages.&nbsp; There are pathological cases for regular expressions that may not truly crash, but result in such an extended period of unresponsiveness on large data sets that the difference is moot.&nbsp; In any language that allows directly linking to arbitrary operating system functions&#8230;well, that&#8217;s just too easy.<br />
<br></br><br></br>Erlang, offering more complex features than many languages, has some particularly interesting edge cases.<br />
<br></br><br></br><b>Run out of atoms.</b>&nbsp; Atoms in Erlang are analogous to symbols in Lisp&#8212;that is, symbolic, non-string identifiers that make code more readable, like <tt>green</tt> or <tt>unknown_value</tt>&#8212;with one exception.&nbsp; Atoms in Erlang are not garbage collected.&nbsp; Once an atom has been created, it lives as long as the Erlang node is running.&nbsp; An easy way to crash the Erlang virtual machine is to loop from 1 to some large number, calling <tt>integer_to_list</tt> and then <tt>list_to_atom</tt> on the current loop index.&nbsp; The atom table will fill up with unused entries, eventually bringing the runtime system to halt.<br />
<br></br><br></br>Why is this is allowed?&nbsp; Because garbage collecting atoms would involve a pass over all data in all processes, something the garbage collector <a href="16.html">was specifically designed</a> to avoid.&nbsp; And in practice, running out of atoms will only happen if you write code that&#8217;s generating new atoms on the fly.<br />
<br></br><br></br><b>Run out of processes.</b>&nbsp; Or similarly, &#8220;run out of memory because you&#8217;ve spawned so many processes.&#8220;&nbsp; While the sequential core of Erlang leans toward being purely functional, the concurrent side is decidedly imperative.&nbsp; If you spawn a non-terminating, unlinked process, and manage to lose the process id for it, then it will just sit there, waiting forever.&nbsp; You&#8217;ve got a process leak.<br />
<br></br><br></br><b>Flood the mailbox for a process.</b>&nbsp; This is something that most new Erlang programmers do sooner or later.&nbsp; One process sends messages to another process without waiting for a reply, and a missing or incorrect pattern in the <tt>receive</tt> statement causes the receiver to ignore all messages&#8230;so they keep piling up until the mailbox fills all available memory, and that&#8217;s that.&nbsp; Another reminder that concurrency in Erlang is imperative.<br />
<br></br><br></br><b>Create too many large binaries in a single process.</b>&nbsp; Large&#8212;greater than 64 byte&#8212;binaries are allocated outside of the per-process heap and are reference counted.&nbsp; The catch is that the reference count indicates how many <i>processes</i> have access to the binary, not how many different pointers there are to it within a process.&nbsp; That makes the runtime system simpler, but it&#8217;s not bulletproof.&nbsp; When garbage collection occurs for a process, unreferenced binaries are deleted, but that&#8217;s only when garbage collection occurs.&nbsp; It&#8217;s possible to create a large process with a slowly growing heap, and create so much binary garbage that the system runs out of memory before garbage collection occurs.&nbsp; Unlikely, yes, but possible.</p> 
]]>
</description>
      <dc:subject>Blogs, Programming in the 21st Century</dc:subject>
      <dc:date>2009-06-15T08:00:00+01:00</dc:date>
    </item>

    <item>
      <title>Digging Deeper into Sufficiently Smartness</title>
      <link>http://www.planeterlang.org/en/planet/article/Digging_Deeper_into_Sufficiently_Smartness/</link>
      <guid>http://www.planeterlang.org/en/planet/article/Digging_Deeper_into_Sufficiently_Smartness/</guid>
      <author>James Hague</author>
      <description><![CDATA[<p>(If you haven&#8217;t read <a href="40.html">On Being Sufficiently Smart</a>, go ahead and do so, otherwise this short note won&#8217;t have any context.)<br />
<br></br><br></br>I frequently write Erlang code that builds a list which ends up backward, so I call <tt>lists:reverse</tt> at the very end to flip it around.&nbsp; This is a common idiom in functional languages.<br />
<br></br><br></br><tt>lists:reverse</tt> is a built-in function in Erlang, meaning it&#8217;s implemented in C, but for the sake of argument let&#8217;s say that it&#8217;s written in Erlang instead.&nbsp; This is super easy, so why not?
</p><pre>reverse(L) -> reverse(L, []).
reverse([H|T], Acc) ->
&nbsp;  reverse(T, [H|Acc]);
reverse([], Acc) ->
&nbsp;  Acc.
</pre><p>Now suppose there&#8217;s another function that uses <tt>reverse</tt> at the very end, just before returning:
</p><pre>collect_digits(L) -> collect_digits(L, []).
collect_digits([H|T], Acc) when H >= $0, H =< $9 ->
&nbsp;  collect_digits(T, [H|Acc]);
collect_digits(_, Acc) ->
&nbsp;  reverse(Acc).
</pre><p>This function returns a list of ASCII digits that prefix a list, so <tt>collect_digits(&#8220;1234.0&#8221;)</tt> returns <tt>&#8220;1234&#8221;</tt>.&nbsp; And now one more &#8220;suppose&#8221;: suppose that one time we decide that we really need to process the result of <tt>collect_digits</tt> backward, so we do this:
</p><pre>reverse(collect_digits(List))
</pre><p>The question is, can the compiler detect that there&#8217;s a double reverse?&nbsp; In theory, the last <tt>reverse</tt> could be dropped from <tt>collect_digits</tt> in the generated code, and each call to <tt>collect_digits</tt> could be automatically wrapped in a call to <tt>reverse</tt>.&nbsp; If there ends up being two calls to <tt>reverse</tt>, then get rid of both of them, because it&#8217;s just wasted effort to double-reverse a list.<br />
<br></br><br></br>With <tt>lists:reverse</tt> as a built-in, this is easy enough.&nbsp; But can it be deduced simply from the raw source code that <tt>reverse(reverse(List))</tt> can be replaced with <tt>List</tt>?&nbsp; Is that effort easier than simply special-casing the list reversal function?</p> 
]]>
</description>
      <dc:subject>Blogs, Programming in the 21st Century</dc:subject>
      <dc:date>2009-06-14T08:00:00+01:00</dc:date>
    </item>

	
    </channel>
</rss>