<?xml version="1.0" encoding="UTF-8"?><!-- generator="wordpress/2.2.3" -->
<rss version="2.0" 
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	>
<channel>
	<title>Comments on: Thoughts About the Erlang Runtime</title>
	<link>http://blog.ianbicking.org/2008/06/09/thoughts-about-the-erlang-runtime/</link>
	<description></description>
	<pubDate>Mon, 01 Dec 2008 22:28:59 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.2.3</generator>

	<item>
		<title>By: Patrick Logan</title>
		<link>http://blog.ianbicking.org/2008/06/09/thoughts-about-the-erlang-runtime/#comment-57809</link>
		<dc:creator>Patrick Logan</dc:creator>
		<pubDate>Tue, 11 Nov 2008 15:11:13 +0000</pubDate>
		<guid>http://blog.ianbicking.org/2008/06/09/thoughts-about-the-erlang-runtime/#comment-57809</guid>
		<description>Lisp</description>
		<content:encoded><![CDATA[<p>Lisp</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jürgen Hermann</title>
		<link>http://blog.ianbicking.org/2008/06/09/thoughts-about-the-erlang-runtime/#comment-57794</link>
		<dc:creator>Jürgen Hermann</dc:creator>
		<pubDate>Tue, 11 Nov 2008 13:58:58 +0000</pubDate>
		<guid>http://blog.ianbicking.org/2008/06/09/thoughts-about-the-erlang-runtime/#comment-57794</guid>
		<description>&#62; Besides XML, are there other systems that aren’t just naive/unextendable (bencode, JSON) and are still basically dynamically typed?

Thrift, while not dynamic in the classic sense, seems to do a good job at creating extensible interfaces with a defined but flexible contract (IDL) that are usable in both dynamic and static languages. All in all, from what I've seen so far, it's a pragmatic compromise weighting the different forces in the right way (IMHO, anyway).

Unlike Hessian, it also doesn't favour one language. Hessian does so for Java, all the clients for other languages are fig leafs.</description>
		<content:encoded><![CDATA[<p>&gt; Besides XML, are there other systems that aren’t just naive/unextendable (bencode, JSON) and are still basically dynamically typed?</p>

<p>Thrift, while not dynamic in the classic sense, seems to do a good job at creating extensible interfaces with a defined but flexible contract (IDL) that are usable in both dynamic and static languages. All in all, from what I&#8217;ve seen so far, it&#8217;s a pragmatic compromise weighting the different forces in the right way (IMHO, anyway).</p>

<p>Unlike Hessian, it also doesn&#8217;t favour one language. Hessian does so for Java, all the clients for other languages are fig leafs.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: RW</title>
		<link>http://blog.ianbicking.org/2008/06/09/thoughts-about-the-erlang-runtime/#comment-26587</link>
		<dc:creator>RW</dc:creator>
		<pubDate>Tue, 12 Aug 2008 09:09:35 +0000</pubDate>
		<guid>http://blog.ianbicking.org/2008/06/09/thoughts-about-the-erlang-runtime/#comment-26587</guid>
		<description>(Pardon the long, late post...)

I'm primarily a Python programmer getting my feet wet with projects combining Python and Erlang. Probably the best way to get the gist of Erlang is to read/skim Joe Armstrong's thesis: http://www.erlang.org/download/armstrong_thesis_2003.pdf.


I've dabbled in Scheme, Common Lisp, Ada, and other languages, but Erlang is the only language I've decided to actually use for real work in the past 10 years other than Python. In my experience, languages like Python and Erlang *complement* each other. Neither language does everything. It's important to remember that all languages have design trade-offs due to their emphasis.

Erlang is most definitely worth learning, but not because it is "better" than favorite language X, or because it is designed to completely replace your favorite language, but because it made trade-offs that other languages didn't, that solve the big difficult problems of software that are very difficult or impossible to fully solve in other languages without making the same extreme trade-offs. Let Erlang make the trade-offs so your other language doesn't have to. :-) A realistic and common approach is to combine Erlang with other languages, like Python.

Here is a comparison of some of the trade-offs and reasoning behind the different languages. (For more details on the Erlang side, please read the thesis PDF.)

Python and concurrency:
Python has the GIL to make it easier for C to interact with Python (from what I've heard). The GIL could be removed, but supposedly writing C towards Python would have been made more complicated. The *advantage* of the GIL is that Python is a great glue language as a result. The disadvantage is reduced ability to take advantage of threads. But I think Python got it right when deciding to go multi-process as a solution, and Erlang also agrees on this design philosophy of using processes. :-)

Erlang and concurrency:
People should keep in mind the context in which Erlang was created. It was for telecoms, where the system *must* be reliable and never go down, while also supporting a high amount of *reliable* concurrency. Deferring concurrency to OS-level threads or OS-level processes wouldn't work, either because they're too slow, or because shared-state is unreliable. Deferring to the OS also can make concurrency inconvenient or sacrifice portability, or at least consistency in performance across platforms. The conclusion was to create lightweight, runtime-level processes. These are not the same as many tasklet, coroutine, pseudo-thread, etc. implementations. The processes must be truly concurrent, not cooperative, and they cannot share state. This separation adds to the additional goal of fault isolation. Processes aren't just a feature, they are the unit-of-work much like how objects are for pure object-oriented languages. Processes communicate through messages. Supposedly, message-passing was a key concept of object-orientation in Smalltalk that was lost in C++, Java, etc. So, processes are analogous to objects (or you can consider them objects from a certain point of view), except they are naturally concurrent and provide more physical separation than multiple objects within the same process in other languages.

Python and libraries:
Python readily binds to C/C++ libraries, and this is convenient. But what happens if that library itself has a serious bug? I've personally experienced times when (especially a C++ library, such as earlier versions of wxPython or beta-quality 3D engines) would crash Python, even though Python itself is stable. The trade-off is that Python readily talks to all sorts of libraries easily, but risks being at the mercy of failures from those libraries. As another example, try using ctypes where the C library is coded badly. For many people, the convenience is worth the risk. For others where the system *must not* go down (e.g. telecoms, mission-critical servers, control apps), the convenience isn't worth the risk. It's a different emphasis/trade-off.

Erlang and libraries:
To talk to other languages, you use a "port" in Erlang, where the external language is a separate process that acts as an Erlang process from Erlang's point of view. The trade-off is that you get fault isolation (which is an *explicit* goal of Erlang, but not an *explicit* goal of Python, although desirable) at the expense of some extra work. External code won't crash Erlang if they're utilized as ports.

Python error handling:
Python uses error-trapping with try/except, like other languages that have try/catch, etc. Because a process is not the de facto unit-of-work for Python, it's natural that error handling is performed within the same process (by default). Although, you could probably act on the exception with a distributed call, the error-trapping is always essentially performed in the same process.

Erlang error handling:
Fault-tolerance is an explicit Erlang goal. That means guarding against *hardware* failure, and not just software exceptions. The only way to guard against hardware failure is through distributed programming, i.e. redundancy and fail-over. This is more than just watching a heart-beat, it can involve any sort of error or exception. The requirement that the error-trapping occurs in the same process as the error makes distributed programming more difficult or less robust. Often the process can't continue and shouldn't even try, and so the sensible thing to do is to detect that is the case, crash the process, and restart the process or *groups* of related processes, where this might even be done from a non-local supervisory process. The exact semantics of how this is done is subtly different than other languages. Maybe you could do it, but not without a lot of work. Technically you can do anything in C that you could do in Python, but the point is to use the best tool for the job. For fault-tolerant sorts of things, Erlang is most likely the best tool for the job.


There is much more than this (behaviors, supervision hierarchies, etc.) but by now it should be apparent that Python and Erlang do their jobs well, but they were meant for different jobs. But there is no reason that such jobs aren't complementary. For example, I'd looked at Twisted too, and it is so foreign from most normal Python code that you might as well learn another language. Especially because it doesn't have the built-in facilities for distributed message passing at the language level, distributed error handling, share-nothing semantics, etc.

If you want one reason to learn Erlang, it is this: no other language has seemed to solve the problem of *reliable* concurrency anywhere near as well. And that is kind of important. Erlang seems to be the only language that comes close to readily scaling linearly in performance with multi-core and distributed. Little things like pattern matching and single-assignment are part of the goal for reliability, but in themselves aren't the whole point.</description>
		<content:encoded><![CDATA[<p>(Pardon the long, late post&#8230;)</p>

<p>I&#8217;m primarily a Python programmer getting my feet wet with projects combining Python and Erlang. Probably the best way to get the gist of Erlang is to read/skim Joe Armstrong&#8217;s thesis: <a href="http://www.erlang.org/download/armstrong&#95;thesis&#95;2003.pdf." rel="nofollow">http://www.erlang.org/download/armstrong<em>thesis</em>2003.pdf.</a></p>

<p>I&#8217;ve dabbled in Scheme, Common Lisp, Ada, and other languages, but Erlang is the only language I&#8217;ve decided to actually use for real work in the past 10 years other than Python. In my experience, languages like Python and Erlang <em>complement</em> each other. Neither language does everything. It&#8217;s important to remember that all languages have design trade-offs due to their emphasis.</p>

<p>Erlang is most definitely worth learning, but not because it is &#8220;better&#8221; than favorite language X, or because it is designed to completely replace your favorite language, but because it made trade-offs that other languages didn&#8217;t, that solve the big difficult problems of software that are very difficult or impossible to fully solve in other languages without making the same extreme trade-offs. Let Erlang make the trade-offs so your other language doesn&#8217;t have to. :-) A realistic and common approach is to combine Erlang with other languages, like Python.</p>

<p>Here is a comparison of some of the trade-offs and reasoning behind the different languages. (For more details on the Erlang side, please read the thesis PDF.)</p>

<p>Python and concurrency:
Python has the GIL to make it easier for C to interact with Python (from what I&#8217;ve heard). The GIL could be removed, but supposedly writing C towards Python would have been made more complicated. The <em>advantage</em> of the GIL is that Python is a great glue language as a result. The disadvantage is reduced ability to take advantage of threads. But I think Python got it right when deciding to go multi-process as a solution, and Erlang also agrees on this design philosophy of using processes. :-)</p>

<p>Erlang and concurrency:
People should keep in mind the context in which Erlang was created. It was for telecoms, where the system <em>must</em> be reliable and never go down, while also supporting a high amount of <em>reliable</em> concurrency. Deferring concurrency to OS-level threads or OS-level processes wouldn&#8217;t work, either because they&#8217;re too slow, or because shared-state is unreliable. Deferring to the OS also can make concurrency inconvenient or sacrifice portability, or at least consistency in performance across platforms. The conclusion was to create lightweight, runtime-level processes. These are not the same as many tasklet, coroutine, pseudo-thread, etc. implementations. The processes must be truly concurrent, not cooperative, and they cannot share state. This separation adds to the additional goal of fault isolation. Processes aren&#8217;t just a feature, they are the unit-of-work much like how objects are for pure object-oriented languages. Processes communicate through messages. Supposedly, message-passing was a key concept of object-orientation in Smalltalk that was lost in C++, Java, etc. So, processes are analogous to objects (or you can consider them objects from a certain point of view), except they are naturally concurrent and provide more physical separation than multiple objects within the same process in other languages.</p>

<p>Python and libraries:
Python readily binds to C/C++ libraries, and this is convenient. But what happens if that library itself has a serious bug? I&#8217;ve personally experienced times when (especially a C++ library, such as earlier versions of wxPython or beta-quality 3D engines) would crash Python, even though Python itself is stable. The trade-off is that Python readily talks to all sorts of libraries easily, but risks being at the mercy of failures from those libraries. As another example, try using ctypes where the C library is coded badly. For many people, the convenience is worth the risk. For others where the system <em>must not</em> go down (e.g. telecoms, mission-critical servers, control apps), the convenience isn&#8217;t worth the risk. It&#8217;s a different emphasis/trade-off.</p>

<p>Erlang and libraries:
To talk to other languages, you use a &#8220;port&#8221; in Erlang, where the external language is a separate process that acts as an Erlang process from Erlang&#8217;s point of view. The trade-off is that you get fault isolation (which is an <em>explicit</em> goal of Erlang, but not an <em>explicit</em> goal of Python, although desirable) at the expense of some extra work. External code won&#8217;t crash Erlang if they&#8217;re utilized as ports.</p>

<p>Python error handling:
Python uses error-trapping with try/except, like other languages that have try/catch, etc. Because a process is not the de facto unit-of-work for Python, it&#8217;s natural that error handling is performed within the same process (by default). Although, you could probably act on the exception with a distributed call, the error-trapping is always essentially performed in the same process.</p>

<p>Erlang error handling:
Fault-tolerance is an explicit Erlang goal. That means guarding against <em>hardware</em> failure, and not just software exceptions. The only way to guard against hardware failure is through distributed programming, i.e. redundancy and fail-over. This is more than just watching a heart-beat, it can involve any sort of error or exception. The requirement that the error-trapping occurs in the same process as the error makes distributed programming more difficult or less robust. Often the process can&#8217;t continue and shouldn&#8217;t even try, and so the sensible thing to do is to detect that is the case, crash the process, and restart the process or <em>groups</em> of related processes, where this might even be done from a non-local supervisory process. The exact semantics of how this is done is subtly different than other languages. Maybe you could do it, but not without a lot of work. Technically you can do anything in C that you could do in Python, but the point is to use the best tool for the job. For fault-tolerant sorts of things, Erlang is most likely the best tool for the job.</p>

<p>There is much more than this (behaviors, supervision hierarchies, etc.) but by now it should be apparent that Python and Erlang do their jobs well, but they were meant for different jobs. But there is no reason that such jobs aren&#8217;t complementary. For example, I&#8217;d looked at Twisted too, and it is so foreign from most normal Python code that you might as well learn another language. Especially because it doesn&#8217;t have the built-in facilities for distributed message passing at the language level, distributed error handling, share-nothing semantics, etc.</p>

<p>If you want one reason to learn Erlang, it is this: no other language has seemed to solve the problem of <em>reliable</em> concurrency anywhere near as well. And that is kind of important. Erlang seems to be the only language that comes close to readily scaling linearly in performance with multi-core and distributed. Little things like pattern matching and single-assignment are part of the goal for reliability, but in themselves aren&#8217;t the whole point.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: dehande</title>
		<link>http://blog.ianbicking.org/2008/06/09/thoughts-about-the-erlang-runtime/#comment-20992</link>
		<dc:creator>dehande</dc:creator>
		<pubDate>Thu, 10 Jul 2008 13:17:01 +0000</pubDate>
		<guid>http://blog.ianbicking.org/2008/06/09/thoughts-about-the-erlang-runtime/#comment-20992</guid>
		<description>the VM can keep two versions of any module in memory (so that you can finish out processes running code written for an old version)</description>
		<content:encoded><![CDATA[<p>the VM can keep two versions of any module in memory (so that you can finish out processes running code written for an old version)</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Ian Bicking</title>
		<link>http://blog.ianbicking.org/2008/06/09/thoughts-about-the-erlang-runtime/#comment-18511</link>
		<dc:creator>Ian Bicking</dc:creator>
		<pubDate>Tue, 17 Jun 2008 15:36:40 +0000</pubDate>
		<guid>http://blog.ianbicking.org/2008/06/09/thoughts-about-the-erlang-runtime/#comment-18511</guid>
		<description>I think a lot of the cases where people want many languages in a single VM are heavily motivated by systems maintenance.  Especially with the JVM, after people make claims about All The Great Libraries You'll Be Able To Use, the advantage noted is the ability to run everything in one container, one build process, etc.

Oddly, when people think about this second problem they seem to ignore the possibility that instead of changing runtimes dramatically they could just fix their build process.  (The challenging part is that fixing the build process in this way usually involves pushing complexity out of the build and up into the language, framework, and application -- but it seems to be worth it.)</description>
		<content:encoded><![CDATA[<p>I think a lot of the cases where people want many languages in a single VM are heavily motivated by systems maintenance.  Especially with the JVM, after people make claims about All The Great Libraries You&#8217;ll Be Able To Use, the advantage noted is the ability to run everything in one container, one build process, etc.</p>

<p>Oddly, when people think about this second problem they seem to ignore the possibility that instead of changing runtimes dramatically they could just fix their build process.  (The challenging part is that fixing the build process in this way usually involves pushing complexity out of the build and up into the language, framework, and application &#8212; but it seems to be worth it.)</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Patrick Logan</title>
		<link>http://blog.ianbicking.org/2008/06/09/thoughts-about-the-erlang-runtime/#comment-18510</link>
		<dc:creator>Patrick Logan</dc:creator>
		<pubDate>Tue, 17 Jun 2008 15:21:44 +0000</pubDate>
		<guid>http://blog.ianbicking.org/2008/06/09/thoughts-about-the-erlang-runtime/#comment-18510</guid>
		<description>"Dealing with a very heterogeneous system can be quite challenging, but I think it’s doable."

Yes, I think that's the current big challenge that is being ignored by the continuing excitement over "many languages in a single VM". We need better ways to do "many languages in many VMs on many nodes".

Primarily that seems like a job for HTTP and XMPP plus some JSON/XHTML conventions plus some management/operations capabilities.

"Maintaining anything is a problem..."

I assume I can quote you on that... ;^/</description>
		<content:encoded><![CDATA[<p>&#8220;Dealing with a very heterogeneous system can be quite challenging, but I think it’s doable.&#8221;</p>

<p>Yes, I think that&#8217;s the current big challenge that is being ignored by the continuing excitement over &#8220;many languages in a single VM&#8221;. We need better ways to do &#8220;many languages in many VMs on many nodes&#8221;.</p>

<p>Primarily that seems like a job for HTTP and XMPP plus some JSON/XHTML conventions plus some management/operations capabilities.</p>

<p>&#8220;Maintaining anything is a problem&#8230;&#8221;</p>

<p>I assume I can quote you on that&#8230; ;^/</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Ian Bicking</title>
		<link>http://blog.ianbicking.org/2008/06/09/thoughts-about-the-erlang-runtime/#comment-18495</link>
		<dc:creator>Ian Bicking</dc:creator>
		<pubDate>Tue, 17 Jun 2008 03:49:32 +0000</pubDate>
		<guid>http://blog.ianbicking.org/2008/06/09/thoughts-about-the-erlang-runtime/#comment-18495</guid>
		<description>Dealing with a very heterogeneous system can be quite challenging, but I think it's doable.  Using a protocol like HTTP (what CouchDB uses, for instance) is probably quite helpful, as it's a protocol that all languages and environments are familiar with.  JSON or XML or something along those lines has a similar advantage.  Sure, you can make other systems understand Erlang's messages, but you don't get the tool support, existing libraries, developer knowledge, etc.

Maintaining a heterogeneous system is also difficult, but a separate problem.  Maintaining *anything* is a problem, it's just one that happens to scale O(n) for n kinds of systems.</description>
		<content:encoded><![CDATA[<p>Dealing with a very heterogeneous system can be quite challenging, but I think it&#8217;s doable.  Using a protocol like HTTP (what CouchDB uses, for instance) is probably quite helpful, as it&#8217;s a protocol that all languages and environments are familiar with.  JSON or XML or something along those lines has a similar advantage.  Sure, you can make other systems understand Erlang&#8217;s messages, but you don&#8217;t get the tool support, existing libraries, developer knowledge, etc.</p>

<p>Maintaining a heterogeneous system is also difficult, but a separate problem.  Maintaining <em>anything</em> is a problem, it&#8217;s just one that happens to scale O(n) for n kinds of systems.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Patrick Logan</title>
		<link>http://blog.ianbicking.org/2008/06/09/thoughts-about-the-erlang-runtime/#comment-18489</link>
		<dc:creator>Patrick Logan</dc:creator>
		<pubDate>Mon, 16 Jun 2008 22:40:19 +0000</pubDate>
		<guid>http://blog.ianbicking.org/2008/06/09/thoughts-about-the-erlang-runtime/#comment-18489</guid>
		<description>"That some hybrid approach is workable, using Erlang for things like a database (e.g., Couch) but writing all my code using traditional concurrency techniques? If the last one is the case (I guess what Patrick is proposing) then… do I need to care about Erlang? If I deploy CouchDB and use it from Python, what should I care what CouchDB implemented in? I don’t worry a great deal about what MySQL is written in."

Yeah. I don't know that I was actually thinking about anything specific, but this is essentially it.

The "application specific" parts of a web application seem easy in Python, Ruby, etc. The "system specific" parts seem fairly easy in Erlang. What would be great would be the ability to integrate these two easily.

So rather than a Django application running in all Python (I assume -- don't know much about Django) instead the distributed, supervisory, scale-outing stuff in Erlang and the app per se in Python. But the Python developer does not have to know that the system stuff is in Erlang.

And the system stuff in Erlang could just as well be running apps in Python as well as Ruby or who-knows-what.

To work with MySQL you have an integration protocol. Same with Erlang and other languages. Although it could be easier.

Another example I've dealt with in the past: the CLIPS rules engine, and Python has a nice integration: PyCLIPS. I'd like to have a farm of rules engines, talk to them through some scalable, distributed, supervisable mechanism just like what Erlang/OTP provides. But talk to them as Python/PyCLIPS "services".

It's very "do-able" but fairly ad hoc. Especially if part of the system is in Ruby, part is in Erlang, and part is in Python (and part in CLIPS (lisp, if no using PyCLIPS)).</description>
		<content:encoded><![CDATA[<p>&#8220;That some hybrid approach is workable, using Erlang for things like a database (e.g., Couch) but writing all my code using traditional concurrency techniques? If the last one is the case (I guess what Patrick is proposing) then… do I need to care about Erlang? If I deploy CouchDB and use it from Python, what should I care what CouchDB implemented in? I don’t worry a great deal about what MySQL is written in.&#8221;</p>

<p>Yeah. I don&#8217;t know that I was actually thinking about anything specific, but this is essentially it.</p>

<p>The &#8220;application specific&#8221; parts of a web application seem easy in Python, Ruby, etc. The &#8220;system specific&#8221; parts seem fairly easy in Erlang. What would be great would be the ability to integrate these two easily.</p>

<p>So rather than a Django application running in all Python (I assume &#8212; don&#8217;t know much about Django) instead the distributed, supervisory, scale-outing stuff in Erlang and the app per se in Python. But the Python developer does not have to know that the system stuff is in Erlang.</p>

<p>And the system stuff in Erlang could just as well be running apps in Python as well as Ruby or who-knows-what.</p>

<p>To work with MySQL you have an integration protocol. Same with Erlang and other languages. Although it could be easier.</p>

<p>Another example I&#8217;ve dealt with in the past: the CLIPS rules engine, and Python has a nice integration: PyCLIPS. I&#8217;d like to have a farm of rules engines, talk to them through some scalable, distributed, supervisable mechanism just like what Erlang/OTP provides. But talk to them as Python/PyCLIPS &#8220;services&#8221;.</p>

<p>It&#8217;s very &#8220;do-able&#8221; but fairly ad hoc. Especially if part of the system is in Ruby, part is in Erlang, and part is in Python (and part in CLIPS (lisp, if no using PyCLIPS)).</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Ian Bicking</title>
		<link>http://blog.ianbicking.org/2008/06/09/thoughts-about-the-erlang-runtime/#comment-18486</link>
		<dc:creator>Ian Bicking</dc:creator>
		<pubDate>Mon, 16 Jun 2008 21:03:12 +0000</pubDate>
		<guid>http://blog.ianbicking.org/2008/06/09/thoughts-about-the-erlang-runtime/#comment-18486</guid>
		<description>The problem with "all these pieces work together perfectly" is that -- according to hearsay -- they work together perfectly to write protocol stacks and distributed databases and stuff like that.  You know what?  I don't care about that kind of stuff.  I would like to write stupid crap like web applications.  And -- according to hearsay -- Erlang isn't good at that.  Relevant aspects of the language (and/or libraries) sound quite painful.  So *something* is off.  Is it just too immature an environment (at least for that domain)?  Or is there something wrong with it?  I can write some functional code when I'm dealing with a Very Hard Problem.  But you know, most problems aren't Very Hard, and I'd rather not twist my brain to solve those problems.  Web programming is just Not Very Hard, even given the concurrency issues.

I know enough [Twisted](http://twistedmatrix.com/trac/) to know that's the wrong way to write web applications.  Maybe it's the right way to write servers that interact directly with sockets.  *Maybe*.  I don't know much Twisted at all, yet I feel pretty confident about my opinion.  Erlang takes a somewhat different approach, and obviously has the language support to back that approach where Twisted does not.  But while I know less about Erlang than I do about Twisted -- and I should rectify that -- I can't help but notice a lack of people claiming Erlang is the Complete Package, or even anywhere close to it.

So... what should I expect to find out, ultimately?  That Erlang is super-awesome and I'm going to stop using anything else?  That share-nothing is nice, but in order to get it I'll need to use something more like CGI (ala App Engine)?  That some hybrid approach is workable, using Erlang for things like a database (e.g., [Couch](http://incubator.apache.org/couchdb/)) but writing all *my* code using traditional concurrency techniques?  If the last one is the case (I guess what Patrick is proposing) then... do I need to care about Erlang?  If I deploy CouchDB and use it from Python, what should I care what CouchDB implemented in?  I don't worry a great deal about what MySQL is written in.</description>
		<content:encoded><![CDATA[<p>The problem with &#8220;all these pieces work together perfectly&#8221; is that &#8212; according to hearsay &#8212; they work together perfectly to write protocol stacks and distributed databases and stuff like that.  You know what?  I don&#8217;t care about that kind of stuff.  I would like to write stupid crap like web applications.  And &#8212; according to hearsay &#8212; Erlang isn&#8217;t good at that.  Relevant aspects of the language (and/or libraries) sound quite painful.  So <em>something</em> is off.  Is it just too immature an environment (at least for that domain)?  Or is there something wrong with it?  I can write some functional code when I&#8217;m dealing with a Very Hard Problem.  But you know, most problems aren&#8217;t Very Hard, and I&#8217;d rather not twist my brain to solve those problems.  Web programming is just Not Very Hard, even given the concurrency issues.</p>

<p>I know enough <a href="http://twistedmatrix.com/trac/">Twisted</a> to know that&#8217;s the wrong way to write web applications.  Maybe it&#8217;s the right way to write servers that interact directly with sockets.  <em>Maybe</em>.  I don&#8217;t know much Twisted at all, yet I feel pretty confident about my opinion.  Erlang takes a somewhat different approach, and obviously has the language support to back that approach where Twisted does not.  But while I know less about Erlang than I do about Twisted &#8212; and I should rectify that &#8212; I can&#8217;t help but notice a lack of people claiming Erlang is the Complete Package, or even anywhere close to it.</p>

<p>So&#8230; what should I expect to find out, ultimately?  That Erlang is super-awesome and I&#8217;m going to stop using anything else?  That share-nothing is nice, but in order to get it I&#8217;ll need to use something more like CGI (ala App Engine)?  That some hybrid approach is workable, using Erlang for things like a database (e.g., <a href="http://incubator.apache.org/couchdb/">Couch</a>) but writing all <em>my</em> code using traditional concurrency techniques?  If the last one is the case (I guess what Patrick is proposing) then&#8230; do I need to care about Erlang?  If I deploy CouchDB and use it from Python, what should I care what CouchDB implemented in?  I don&#8217;t worry a great deal about what MySQL is written in.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Patrick Logan</title>
		<link>http://blog.ianbicking.org/2008/06/09/thoughts-about-the-erlang-runtime/#comment-18361</link>
		<dc:creator>Patrick Logan</dc:creator>
		<pubDate>Fri, 13 Jun 2008 23:46:22 +0000</pubDate>
		<guid>http://blog.ianbicking.org/2008/06/09/thoughts-about-the-erlang-runtime/#comment-18361</guid>
		<description>Several good comments on the many benefits of Erlang and especially the combination of those into the sum greater than the parts kind of thing. One more to point out...

Messaging and pattern matching in Erlang are deeply intertwined, i.e. "selective pattern-based receive". If you just accept messages over various pipes and you just pattern match on various language data structures, you still don't obtain the benefits of an intertwined mechanism for pattern matching within the "per thread" (shared nothing thread in Erlang) mailbox.

Erlang is subtly, specially simple in its own way, just as Python's various object, meta, syntactical foo makes it expressive in its own way. What we really need are simple, efficient ways to interact between Erlang, Python, and other systems, not necessarily, if ever, running in the same OS process. We need to easily spin each of these things up to do their own work and use each other.

Such a mechanism exists for Python and Java and C to interact with Erlang, but we need more general foo.</description>
		<content:encoded><![CDATA[<p>Several good comments on the many benefits of Erlang and especially the combination of those into the sum greater than the parts kind of thing. One more to point out&#8230;</p>

<p>Messaging and pattern matching in Erlang are deeply intertwined, i.e. &#8220;selective pattern-based receive&#8221;. If you just accept messages over various pipes and you just pattern match on various language data structures, you still don&#8217;t obtain the benefits of an intertwined mechanism for pattern matching within the &#8220;per thread&#8221; (shared nothing thread in Erlang) mailbox.</p>

<p>Erlang is subtly, specially simple in its own way, just as Python&#8217;s various object, meta, syntactical foo makes it expressive in its own way. What we really need are simple, efficient ways to interact between Erlang, Python, and other systems, not necessarily, if ever, running in the same OS process. We need to easily spin each of these things up to do their own work and use each other.</p>

<p>Such a mechanism exists for Python and Java and C to interact with Erlang, but we need more general foo.</p>
]]></content:encoded>
	</item>
</channel>
</rss>
