<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0"><channel><title>20bits - Latest Comments in Erlang: A Generalized TCP Server | 20bits</title><link>http://20bits.disqus.com/</link><description></description><language>en</language><lastBuildDate>Sun, 17 May 2009 12:29:31 -0000</lastBuildDate><item><title>Re: Erlang: A Generalized TCP Server | 20bits</title><link>http://20bits.com/articles/erlang-a-generalized-tcp-server/#comment-9472557</link><description>The stubs at the bottom are there because  I didn't have time to implement them and I didn't think they'd improve the example.&lt;br&gt;&lt;br&gt;But the gen_server behavior has a lot to offer, especially if you want to make your server more robust.</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">jfarmer</dc:creator><pubDate>Sun, 17 May 2009 12:29:31 -0000</pubDate></item><item><title>Re: Erlang: A Generalized TCP Server | 20bits</title><link>http://20bits.com/articles/erlang-a-generalized-tcp-server/#comment-9472456</link><description>The loop is stored in the State#server_state record, which gen_server passes to each of its callbacks.</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">jfarmer</dc:creator><pubDate>Sun, 17 May 2009 12:23:33 -0000</pubDate></item><item><title>Re: Erlang: A Generalized TCP Server | 20bits</title><link>http://20bits.com/articles/erlang-a-generalized-tcp-server/#comment-9468979</link><description>So, what's the advantage of using gen_server here? Looks to me like most of the gen_server abstraction is actually being bypassed just to get it to work with TCP.</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Matt</dc:creator><pubDate>Sun, 17 May 2009 07:41:14 -0000</pubDate></item><item><title>Re: Erlang: A Generalized TCP Server | 20bits</title><link>http://20bits.com/articles/erlang-a-generalized-tcp-server/#comment-8868102</link><description>there is still some "magic" that is not explained here.&lt;br&gt;in socket_server:start() how does "loop" get mapped in the socket_server code?&lt;br&gt;I mean where does the "loop" function that gets passed in actually get called?</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Jarrod</dc:creator><pubDate>Thu, 30 Apr 2009 12:52:02 -0000</pubDate></item><item><title>Re: Erlang: A Generalized TCP Server | 20bits</title><link>http://20bits.com/articles/erlang-a-generalized-tcp-server/#comment-8319573</link><description>Thanks a lot,&lt;br&gt;you solution is super great!</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Dmitrii Golub</dc:creator><pubDate>Fri, 17 Apr 2009 23:03:42 -0000</pubDate></item><item><title>Re: Erlang: A Generalized TCP Server | 20bits</title><link>http://20bits.com/articles/erlang-a-generalized-tcp-server/#comment-3955408</link><description>There's some switching around you can do with code:purge/1 and code:load_file/1 that I don't completely understand: &lt;a href="http://gist.github.com/27901" rel="nofollow"&gt;http://gist.github.com/27901&lt;/a&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Bryce</dc:creator><pubDate>Sat, 22 Nov 2008 13:17:41 -0000</pubDate></item><item><title>Re: Erlang: A Generalized TCP Server | 20bits</title><link>http://20bits.com/articles/erlang-a-generalized-tcp-server/#comment-3855421</link><description>Nice.&lt;br&gt;&lt;br&gt;Given the constant need for something like gen_tcp, why on earth haven't they added one to the official Erlang/OTP bundle?</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">vegai</dc:creator><pubDate>Mon, 17 Nov 2008 06:12:02 -0000</pubDate></item><item><title>Re: Erlang: A Generalized TCP Server | 20bits</title><link>http://20bits.com/articles/erlang-a-generalized-tcp-server/#comment-3793619</link><description>Same question about the GeSHi Erlang support - have you submitted it?</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Ciaran</dc:creator><pubDate>Mon, 13 Oct 2008 07:28:47 -0000</pubDate></item><item><title>Re: Erlang: A Generalized TCP Server | 20bits</title><link>http://20bits.com/articles/erlang-a-generalized-tcp-server/#comment-3793624</link><description>Have you submitted your geshi plugin to the geshi people?</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Harry</dc:creator><pubDate>Fri, 26 Sep 2008 11:51:33 -0000</pubDate></item><item><title>Re: Erlang: A Generalized TCP Server | 20bits</title><link>http://20bits.com/articles/erlang-a-generalized-tcp-server/#comment-3793623</link><description>@Jesse, would I be right in thinking that a TCP service exposed like this could in fact end up using millions of [erlang] processes and potentially hammer the system resources?&lt;br&gt;I'm *very* new to erlang, so may not be following correctly, but it looks like a process is spawned for every "accept", so a malicious user could cause some trouble if the spawned process was actually doing something more intensive?.&lt;br&gt;&lt;br&gt;Thanks for the erlang posts, do keep them up if you can.</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">chrisfarms</dc:creator><pubDate>Tue, 12 Aug 2008 12:09:18 -0000</pubDate></item><item><title>Re: Erlang: A Generalized TCP Server | 20bits</title><link>http://20bits.com/articles/erlang-a-generalized-tcp-server/#comment-3793618</link><description>I think you can compile echo_server.erl twice in a row if you change loop(Socket); to ?MODULE:loop(Socket);&lt;br&gt;&lt;br&gt;Try it out.</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Arni Hermann</dc:creator><pubDate>Thu, 07 Aug 2008 13:07:50 -0000</pubDate></item><item><title>Re: Erlang: A Generalized TCP Server | 20bits</title><link>http://20bits.com/articles/erlang-a-generalized-tcp-server/#comment-3793625</link><description>Great article ! I was just wondering how I could make a TCP server using OTP gen_server after having read chapters 16 and 18 in Armstrong's book. Accept() was my problem and you solved it. Right on time &lt;br&gt;:)&lt;br&gt;I would also be interested in some informations about asynchronous accept. In fact I use "receive" and messages between processes to handle recv() on the socket. I do this because my process must have the ability to recv() and send() datas without knowing which one will come first. So it could be good for me to extend this style of managing things to accept() as well.</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Ludovic Kuty</dc:creator><pubDate>Wed, 06 Aug 2008 11:58:23 -0000</pubDate></item><item><title>Re: Erlang: A Generalized TCP Server | 20bits</title><link>http://20bits.com/articles/erlang-a-generalized-tcp-server/#comment-3793627</link><description>Ok so apparently erlang keeps 2 versions of module code (old and current)&lt;br&gt;and processes that run old code are purged (killed). This is badly&lt;br&gt;explained almost everywhere i've looked and examples are scarce to come&lt;br&gt;by for something so important. So my next question then is how to&lt;br&gt;do a hot code update without killing the tcp server or dropping any existing&lt;br&gt;connections. After all this is erlang where 99.999% availability can be achieved&lt;br&gt;this trivial task (which you get for free in common lisp without having to do&lt;br&gt;anything special) should be possible.&lt;br&gt;&lt;br&gt;After hours of scavenging in badly written documentation, trying to understand&lt;br&gt;the monstrosity that seems to be OTP (also noticed that pragmatic programming: erlang&lt;br&gt;conveniently pushes this issue under the rug) i still have found no solutions. &lt;br&gt;It seems everywhere i look at these days, proponents of erlang keep rambling about&lt;br&gt;"scalability, availability, hot code updates" as if these are things that can be&lt;br&gt;magically gotten for free. Well  if "hot code updates" is how things are done in erlang,&lt;br&gt;i will have none of that.</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">mike</dc:creator><pubDate>Mon, 14 Jul 2008 11:49:48 -0000</pubDate></item><item><title>Re: Erlang: A Generalized TCP Server | 20bits</title><link>http://20bits.com/articles/erlang-a-generalized-tcp-server/#comment-3793626</link><description>You should probably explain why with the echo server up and running,&lt;br&gt;compiling echo_server.erl twice in a row kills the server.&lt;br&gt;&lt;br&gt;This is really frustrating to someone coming from lisp where&lt;br&gt;hot code updates trully "just work" and things do not fail&lt;br&gt;mysteriously. I have been trying to find out the cause of&lt;br&gt;this behavior for the past hour with no success.</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">mike</dc:creator><pubDate>Sun, 13 Jul 2008 21:11:01 -0000</pubDate></item><item><title>Re: Erlang: A Generalized TCP Server | 20bits</title><link>http://20bits.com/articles/erlang-a-generalized-tcp-server/#comment-3793622</link><description>Jesse, thanks for this really useful overview!  This is my first exposure to gen_server and gen_tcp and I would have been lost without this.</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">John B</dc:creator><pubDate>Wed, 09 Jul 2008 21:12:12 -0000</pubDate></item><item><title>Re: Erlang: A Generalized TCP Server | 20bits</title><link>http://20bits.com/articles/erlang-a-generalized-tcp-server/#comment-3793621</link><description>Kyle,&lt;br&gt;&lt;br&gt;I'm using geshi with an Erlang syntax plugin I wrote myself.</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Jesse</dc:creator><pubDate>Mon, 16 Jun 2008 13:44:43 -0000</pubDate></item><item><title>Re: Erlang: A Generalized TCP Server | 20bits</title><link>http://20bits.com/articles/erlang-a-generalized-tcp-server/#comment-3793620</link><description>What are you using for your code highlighting? It looks great.</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Kyle K</dc:creator><pubDate>Mon, 16 Jun 2008 13:33:40 -0000</pubDate></item></channel></rss>