<?xml version="1.0" encoding="utf-8" ?>

<rss version="2.0" 
   xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
   xmlns:admin="http://webns.net/mvcb/"
   xmlns:dc="http://purl.org/dc/elements/1.1/"
   xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
   xmlns:wfw="http://wellformedweb.org/CommentAPI/"
   xmlns:content="http://purl.org/rss/1.0/modules/content/"
   >
<channel>
    <title>ingo() -&gt; tech. % Ingo Schramm - Erlang</title>
    <link>http://www.ingo-schramm.de/blog/</link>
    <description>Share experience in web development</description>
    <dc:language>en</dc:language>
    <generator>Serendipity 1.3.1 - http://www.s9y.org/</generator>
    <pubDate>Wed, 07 Oct 2009 10:50:08 GMT</pubDate>

    <image>
        <url>http://www.ingo-schramm.de/blog/templates/default/img/s9y_banner_small.png</url>
        <title>RSS: ingo() -&gt; tech. % Ingo Schramm - Erlang - Share experience in web development</title>
        <link>http://www.ingo-schramm.de/blog/</link>
        <width>100</width>
        <height>21</height>
    </image>

<item>
    <title>Google Wave On Your Knees</title>
    <link>http://www.ingo-schramm.de/blog/archives/13-Google-Wave-On-Your-Knees.html</link>
            <category>Erlang</category>
            <category>Wave</category>
            <category>Web 2.0</category>
    
    <comments>http://www.ingo-schramm.de/blog/archives/13-Google-Wave-On-Your-Knees.html#comments</comments>
    <wfw:comment>http://www.ingo-schramm.de/blog/wfwcomment.php?cid=13</wfw:comment>

    <slash:comments>0</slash:comments>
    <wfw:commentRss>http://www.ingo-schramm.de/blog/rss.php?version=2.0&amp;type=comments&amp;cid=13</wfw:commentRss>
    

    <author>nospam@example.com (Ingo)</author>
    <content:encoded>
    Installing Google Wave on a laptop ist relatively easy and straightforward. You just have to follow the instructions here: &lt;a href=&quot;http://code.google.com/p/wave-protocol/wiki/Installation&quot; title=&quot;Google Wave Installation&quot; target=&quot;_new&quot;&gt;wave-protocol installation&lt;/a&gt;. If you have any problems with Openfire such as non working admin passwords you may switch to the famous ejabberd which is a XMPP server written in Erlang. An installation instruction for this setup you may find here: &lt;a href=&quot;http://www.process-one.net/en/blogs/article/using_google_wave_reference_implementation_with_ejabberd/&quot; title=&quot;Wave and ejabberd&quot; target=&quot;_new&quot;&gt;using google wave reference implementation with ejabberd&lt;/a&gt;. &lt;br /&gt;
&lt;br /&gt;
After you have a XMPP server running you create the certificates as described here: &lt;a href=&quot;http://code.google.com/p/wave-protocol/wiki/Certificates&quot; title=&quot;Wave Server Certificates&quot; target=&quot;_new&quot;&gt;wave-protocol certificates&lt;/a&gt;. You just copy the *.cert  and *.key file into your wave-protocol root directory.&lt;br /&gt;
&lt;br /&gt;
Next you edit the ./run-config.sh and assign the proper values of your setup to the variables. Hint: don&#039;t forget to comment or remove the line at the top saying &lt;br /&gt;
&lt;br /&gt;
&lt;code&gt;echo &quot;You must configure the run-config.sh script&quot; ; exit 1&lt;/code&gt;&lt;br /&gt;
&lt;br /&gt;
When all this has been done you may start the server:&lt;br /&gt;
&lt;br /&gt;
&lt;code&gt;./run-server.sh&lt;/code&gt;&lt;br /&gt;
&lt;br /&gt;
If all gone well you find some INFO logging in your terminal. Next you open two additional terminal windows and start one wave client per window, each with a different username:&lt;br /&gt;
&lt;br /&gt;
&lt;code&gt;./run-client-console.sh mr-foo&lt;/code&gt;&lt;br /&gt;
&lt;br /&gt;
and in the other terminal:&lt;br /&gt;
&lt;br /&gt;
&lt;code&gt;./run-client-console.sh mr-bar&lt;/code&gt;&lt;br /&gt;
&lt;br /&gt;
Now you are ready to initiate a conversation between Mr. Foo and Mr. Bar. In Mr. Foo&#039;s window type &quot;/new&quot;. This will create a new wave. Then type &quot;/add mr-bar@your-domain&quot;. This adds Mr. Bar to the wave. In the other window you should see the wave appear. Then you may type something like &quot;Hello Mr. Foo&quot; there. Pressing enter will make the greeting appear in Mr. Foo&#039;s window. You&#039;ve done a Wave communication in your laptop!&lt;br /&gt;
&lt;br /&gt;
Below you find a list of the available commands in the console client. Just type a slash and the name and arguments of the command, then enter.&lt;br /&gt;
&lt;br /&gt;
&lt;pre&gt;&lt;br /&gt;
connect   user@domain server port  connect to &lt;br /&gt;
                                   server:port as user@domain&lt;br /&gt;
open      entry                    open a wave given an inbox &lt;br /&gt;
                                   entry&lt;br /&gt;
new                                create a new wave&lt;br /&gt;
add       user@domain              add a user to a wave&lt;br /&gt;
remove    user@domain              remove a user from a wave&lt;br /&gt;
read                               set all waves as read&lt;br /&gt;
undo      [user@domain]            undo last line by a user, &lt;br /&gt;
                                   defaulting to current user&lt;br /&gt;
scroll    lines                    set the number of lines to &lt;br /&gt;
                                   scroll by with { and }&lt;br /&gt;
view      mode                     change view mode for the open &lt;br /&gt;
                                   wavelet (normal, xml)&lt;br /&gt;
log                                dump the log to the screen&lt;br /&gt;
dumplog   file                     dump the log to a file&lt;br /&gt;
clearlog                           clear the log&lt;br /&gt;
quit                               quit the client&lt;br /&gt;
&lt;/pre&gt; 
    </content:encoded>

    <pubDate>Tue, 06 Oct 2009 19:54:00 +0200</pubDate>
    <guid isPermaLink="false">http://www.ingo-schramm.de/blog/archives/13-guid.html</guid>
    
</item>
<item>
    <title>What Erlang/OTP is good for and what it is not</title>
    <link>http://www.ingo-schramm.de/blog/archives/11-What-ErlangOTP-is-good-for-and-what-it-is-not.html</link>
            <category>Erlang</category>
            <category>Scalability</category>
            <category>Web 2.0</category>
            <category>Web Applications</category>
    
    <comments>http://www.ingo-schramm.de/blog/archives/11-What-ErlangOTP-is-good-for-and-what-it-is-not.html#comments</comments>
    <wfw:comment>http://www.ingo-schramm.de/blog/wfwcomment.php?cid=11</wfw:comment>

    <slash:comments>0</slash:comments>
    <wfw:commentRss>http://www.ingo-schramm.de/blog/rss.php?version=2.0&amp;type=comments&amp;cid=11</wfw:commentRss>
    

    <author>nospam@example.com (Ingo)</author>
    <content:encoded>
    Erlang/OTP is without any doubt a powerful tool. But as with any technology it&#039;s not good for any use case imaginable. It has a lot of strengths but some weaknesses too. Erlang glances in everything related to distribution and reliability. If you want to write software to be arbitrarily distributed over multiple instances, CPU cores, mashines or even data centers without having to change the programming paradigm for any particular case you probably have the perfect tool with Erlang. To benefit from Erlang you should have a problem best solved with a distributed solution. This may be reliable message passing or rock solid in memory storage but it is probably not web page generation and delivery. &lt;br /&gt;
&lt;br /&gt;
In the Internet world, Erlang is perfect for middle ware or backend systems like caches, message queues and exchanges, databases or storage abstractions. But it is probably not the right tool to write web applications. Sure, you may add a HTTP endpoint to your message middle ware or database but should you use Erlang in a way one usually uses JSP or PHP or Ruby? Probably not. Web applications have a very short life cycle. The business rules are in a constant flow and have to be changed over and over again. To define such rules in Erlang may turn out to be a very hard job. Despite of its expressiveness Erlang is not the language to be used as an embedded language as for Yaws dynamic content or in ehtml. It works - but it is comparably hard to maintain and not that fast in terms of execution time.&lt;br /&gt;
&lt;br /&gt;
It&#039;s not that Erlang is a functional language but it&#039;s a functional language with a special syntax. There are all those commas, semicolons and dots and a pretty verbose notation for associative arrays, the records. The benefits of the syntax as for example how you deal with binary data is of little use when programming the business rules of a web application. It&#039;s simply not designed for such a use case. It&#039;s designed for writing reliable software dealing with network communication and related stuff. But it&#039;s not made to express complex rules in a domain specific language.&lt;br /&gt;
&lt;br /&gt;
On the other hand, the Erlang VM is highly optimized to spawn and execute a huge number of small processes but it&#039;s probably not optimized to execute a thread in the shortest possible time ever. Modern Java implementations may beat current Erlang easily. Sure, the maintainers of the Erlang VM do a lot of work improving both performance and SMP scalability but all those optimizations a not yet at the end. High performance is not the domain of the OTP.&lt;br /&gt;
&lt;br /&gt;
When you ever think about using Erlang, the first question to ask should be whether your problem deals with either redundancy, scalability or distribution. Second is whether you not have to deal with high performance as well, and you should not have to deal with the low lifetime of business rules. If you answer these questions with yes you get a highly optimized and convenient tool for the job.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
 
    </content:encoded>

    <pubDate>Wed, 27 May 2009 16:56:28 +0200</pubDate>
    <guid isPermaLink="false">http://www.ingo-schramm.de/blog/archives/11-guid.html</guid>
    
</item>
<item>
    <title>Erlang Release R13B Preview Benchmark</title>
    <link>http://www.ingo-schramm.de/blog/archives/10-Erlang-Release-R13B-Preview-Benchmark.html</link>
            <category>Erlang</category>
    
    <comments>http://www.ingo-schramm.de/blog/archives/10-Erlang-Release-R13B-Preview-Benchmark.html#comments</comments>
    <wfw:comment>http://www.ingo-schramm.de/blog/wfwcomment.php?cid=10</wfw:comment>

    <slash:comments>145</slash:comments>
    <wfw:commentRss>http://www.ingo-schramm.de/blog/rss.php?version=2.0&amp;type=comments&amp;cid=10</wfw:commentRss>
    

    <author>nospam@example.com (Ingo)</author>
    <content:encoded>
    At the end of the month a new Erlang release will be available for production: R13B. What I know so far is very promising. A lot of work has been done to improve SMP performance and flexibility. Beside of remarkable internal optimizations as for example the multiple run-queues a number of switches are added to have better control on the SMP behavior. Now you can bind schedulers to logical processors or change the number of active schedulers on runtime, just to name a few. Another goodie is added unicode support. &lt;br /&gt;
&lt;br /&gt;
To check out the effect of the new run queues I was running a little benchmark with R13A. The program creates a ring of 5000 processes and executes a simple leader election algorithm with O(n^2) communication complexity. The mashine was a 4 Opteron 1.8GHz with 64bit Linux 2.6.18. Kernel polling was active. As you may see in the picture below the program has not been well written in the sense of good asynchrony since it performs almost always better on a single core. That&#039;s perfect for the benchmark and it really challenges the SMP implementation. The multiple run queues have a remarkable benefit in both performance and scalability and this may even be better for an increasing number of cores.&lt;br /&gt;
&lt;br /&gt;
&lt;a class=&#039;serendipity_image_link&#039; href=&#039;http://www.ingo-schramm.de/blog/uploads/R13A_4cpu.png&#039; target=&quot;_blank&quot;&gt;&lt;!-- s9ymdb:2 --&gt;&lt;img class=&quot;serendipity_image_center&quot; width=&quot;110&quot; height=&quot;70&quot; style=&quot;border: 0px; padding-left: 5px; padding-right: 5px;&quot; src=&quot;http://www.ingo-schramm.de/blog/uploads/R13A_4cpu.serendipityThumb.png&quot; alt=&quot;&quot; /&gt;&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
Investment in Erlang is investment in the future. With every new release the inventors of the OTP runtime will add more and better SMP features. The focus of the runtime is still more on distribution and reliability but the performance and scalability will soon reach those of other technologies.&lt;br /&gt;
&lt;br /&gt;
UPDATE 1&lt;br /&gt;
&lt;br /&gt;
The same test running on a 8 core Intel Xeon 3 GHz with a 64bit 2.6.9 Linux:&lt;br /&gt;
&lt;br /&gt;
&lt;a class=&#039;serendipity_image_link&#039; href=&#039;http://www.ingo-schramm.de/blog/uploads/ErlangR13A_8CPU.png&#039; target=&quot;_blank&quot;&gt;&lt;!-- s9ymdb:2 --&gt;&lt;img class=&quot;serendipity_image_center&quot; width=&quot;110&quot; height=&quot;73&quot; style=&quot;border: 0px; padding-left: 5px; padding-right: 5px;&quot; src=&quot;http://www.ingo-schramm.de/blog/uploads/ErlangR13A_8CPU.serendipityThumb.png&quot; alt=&quot;&quot; /&gt;&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
UPDATE 2&lt;br /&gt;
&lt;br /&gt;
Sources: &lt;a href=&quot;http://www.ingo-schramm.de/blog/uploads/ring_leader_erlb.tar.gz&quot; title=&quot;ring_leader_erlb.tar.gz&quot; target=&quot;_blank&quot;&gt;ring_leader_erlb.tar.gz&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
 
    </content:encoded>

    <pubDate>Mon, 06 Apr 2009 14:43:13 +0200</pubDate>
    <guid isPermaLink="false">http://www.ingo-schramm.de/blog/archives/10-guid.html</guid>
    
</item>

</channel>
</rss>