{"id":46,"date":"2008-02-07T00:41:29","date_gmt":"2008-02-07T05:41:29","guid":{"rendered":"http:\/\/steve.vinoski.net\/blog\/2008\/02\/07\/wiger-on-erlang-style-concurrency\/"},"modified":"2008-02-07T00:41:29","modified_gmt":"2008-02-07T05:41:29","slug":"wiger-on-erlang-style-concurrency","status":"publish","type":"post","link":"https:\/\/steve.vinoski.net\/blog\/2008\/02\/07\/wiger-on-erlang-style-concurrency\/","title":{"rendered":"Wiger on Erlang-style Concurrency"},"content":{"rendered":"<p>Since a number of people seem to be experimenting with adding Erlang-style concurrency to other languages, <a href=\"http:\/\/ulf.wiger.net\/weblog\">Ulf Wiger<\/a> has written a <a href=\"http:\/\/ulf.wiger.net\/weblog\/?p=10\">nice explanation of what Erlang-style concurrency actually is<\/a>. Definitely informative.<\/p>\n<p>On a related note, I chuckled when I saw this posting from Robert Virding, who helped create Erlang, in the <a href=\"http:\/\/www.erlang.org\/pipermail\/erlang-questions\/\">erlang-questions list<\/a> about a <a href=\"http:\/\/www.erlang.org\/pipermail\/erlang-questions\/2008-January\/032224.html\">month ago<\/a>:<\/p>\n<blockquote><p><em>After reading the blogs about how good Erlang&#8217;s concurrency model is and how we just just made a super implementation of it in XXX I have been led to formulate Virding&#8217;s First Rule of Programming: <\/p>\n<p>Any sufficiently complicated concurrent program in another language contains an ad hoc informally-specified bug-ridden slow implementation of half of Erlang. <\/p>\n<p>This is, of course, a mild travesty of <a href=\"http:\/\/en.wikipedia.org\/wiki\/Greenspun's_Tenth_Rule\">Greenspun<\/a> but I think it is fundamental enough to be my first rule, not the tenth.<\/em><\/p><\/blockquote>\n<p>I can understand where he&#8217;s coming from. When I see the kind of blog postings he&#8217;s referring to, I always wonder why they don&#8217;t just use Erlang itself instead of trying to reinvent it in another system whose design trade-offs are unlikely to be able to support it. Well, I guess it would make sense in the case where they&#8217;re specifically studying various implementations of concurrency, but other than that, I don&#8217;t get it.<\/p>\n<p>On another related note, I found the comment below in another blog. It refers specifically to my own use of Erlang:<\/p>\n<blockquote><p><em>it&#8217;s [sic] be interesting to see how Steve mix [sic] Erlang and HTTP, since Erlang is asynchronous in nature and does not have any &#8220;resource&#8221; concept and HTTP&#8217;s sweet spots are just the opposite<\/em><\/p><\/blockquote>\n<p>That&#8217;s easy. If you want to experience HTTP as implemented in Erlang, just go to the <a href=\"http:\/\/yaws.hyber.org\/\">Yaws website<\/a>, which of course is powered by Yaws itself. As <a href=\"http:\/\/ulf.wiger.net\/weblog\/?p=10\">Ulf&#8217;s blog posting<\/a> explains, Erlang message passing is asynchronous, but that really has nothing to do with <a href=\"http:\/\/www.erlang.org\/doc\/man\/gen_tcp.html\">Erlang&#8217;s ability to support protocols like HTTP<\/a>. For example, when I was learning Erlang, given my <a href=\"\/blog\/acpwc\/\">CORBA background<\/a> I wrote a subset of IIOP, and it was really quite easy. Furthermore, Erlang doesn&#8217;t need a &#8220;resource&#8221; concept to support HTTP. A resource in that context is, after all, ultimately just a chunk of code that processes incoming requests, and of course Erlang can do that.<\/p>\n<p>If you want to know more, go pick up <a href=\"http:\/\/www.pragprog.com\/titles\/jaerlang\">Joe Armstrong&#8217;s Erlang book<\/a> &#8212; it&#8217;s quite excellent.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Since a number of people seem to be experimenting with adding Erlang-style concurrency to other languages, Ulf Wiger has written a nice explanation of what Erlang-style concurrency actually is. Definitely informative. On a related note, I chuckled when I saw this posting from Robert Virding, who helped create Erlang, in the erlang-questions list about a [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[72,4,43,73],"tags":[172,140,162],"class_list":["post-46","post","type-post","status-publish","format-standard","hentry","category-concurrency","category-erlang","category-http","category-messaging","tag-concurrency","tag-erlang","tag-http"],"_links":{"self":[{"href":"https:\/\/steve.vinoski.net\/blog\/wp-json\/wp\/v2\/posts\/46","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/steve.vinoski.net\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/steve.vinoski.net\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/steve.vinoski.net\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/steve.vinoski.net\/blog\/wp-json\/wp\/v2\/comments?post=46"}],"version-history":[{"count":0,"href":"https:\/\/steve.vinoski.net\/blog\/wp-json\/wp\/v2\/posts\/46\/revisions"}],"wp:attachment":[{"href":"https:\/\/steve.vinoski.net\/blog\/wp-json\/wp\/v2\/media?parent=46"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/steve.vinoski.net\/blog\/wp-json\/wp\/v2\/categories?post=46"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/steve.vinoski.net\/blog\/wp-json\/wp\/v2\/tags?post=46"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}