On Tue, Sep 29, 2009 at 2:16 PM, Alec Matusis <span dir="ltr">&lt;<a href="mailto:matusis@yahoo.com">matusis@yahoo.com</a>&gt;</span> wrote:<br><div class="gmail_quote"><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
I have been a long time Twisted user, and I do not know Erlang.<br>
I run into this interesting comment in engineering notes on Facebook Chat<br>
scalability:<br>
<br>
<a href="http://www.facebook.com/note.php?note_id=51412338919&amp;comments" target="_blank">http://www.facebook.com/note.php?note_id=51412338919&amp;comments</a><br>
<br>
“Leif K-Brooks<br>
I&#39;m curious whether you considered using the Python library Twisted<br>
(<a href="http://twistedmatrix.com/" target="_blank">http://twistedmatrix.com/</a>) before deciding on Erlang. Its architecture is<br>
also supposed to be able to support a large number of concurrent<br>
connections. I would be interested in hearing about any issues you<br>
discovered with it.<br>
February 18 at 3:17am · Report<br>
<br>
Lawrence Oluyede<br>
TwistedMatrix does not possess the capabilities of Erlang, not even close.<br>
February 18 at 4:35am · Report<br>
<br>
<br>
What do you guys think?<br>
<br></blockquote><div><br>I remember reading that comment and sighing to myself.  First of all:<br><br>1. Twisted is a framework for event-driven programming<br>2. Erlang is a programming language / VM<br><br>So any comparison between the two doesn&#39;t make much sense. <br>
<br>Secondly, the use of the term &quot;TwistedMatrix&quot; indicates pretty strongly that the poster knows next-to-nothing about Twisted.    At surface level the comment is completely unqualified, lacking any detail. <br>
<br>&lt;sarcasm&gt;It doesn&#39;t &quot;possess the capabilities&quot; of Erlang?  So Erlang has some unspecified capabilities (they most be really important ones) that Twisted obviously does not.  That&#39;s great to know.  Thanks for the detail there Mr. Oluyede.&lt;/sarcasm&gt;   <br>
<br>A comparison between Erlang and Python the VMs might be more interesting.  First of all, Erlang was developed from the ground up with performance and concurrency in mind, whereas Python was not.  The primary design concern of Python, arguably, was to develop a language that was easy to learn with a syntax that lended itself to programs that are easy to read and thus easy to maintain.<br>
<br>A fast VM is great, but do you want that at the expense of having less choices for third-party libraries or having to learn an entirely different language paradigm.  If you work primarily with OOP, for example, Erlang might be a dramatic shift for your development team - switching to FP.  That&#39;s not much fun if programming is your livlihood moreso than a hobby.  <br>
<br>Personally I prefer Python to Erlang accepting the performance trade-off.  There&#39;s more choices when it comes to open-source libraries for the language and it performs well enough.  I&#39;m writing production applications in Python using Twisted and we have 0 issues with performance (memory, CPU, IO).  Twisted does
handle a large number of connections.  The issues we&#39;ve run into in our application have always been at a layer above Twisted (i.e. our shit that&#39;s broken, not Twisted).  It performs, it&#39;s stable.  So ... what are my motiviations for abandoning Python/Twisted in favor or Erlang? <br>
<br>Let me just say though that I really like Erlang.  I think it&#39;s a decent language with simple-enough syntax and a kick-ass concurrency paradigm - shared nothing and message passing.  It looks like things are also dramatically improving in the Erlang open-space (and it seems this is improving dramatically: <a href="http://erlware.org/erlware/index.html">http://erlware.org/erlware/index.html</a>), so it might not be long before there are as many or more library choices for Erlang as Python.<br>
<br>Nonethelless, please let first-hand experience using a language, gaining productivity and then buy-in from your development team be the key deciding factors - not some arbitrary number in a benchmark test or even worse a completely uninformed comment on a Facebook dev blog post.<br>
<br>-Drew<br><br><br></div></div><br>