[Twisted-Python] I found an interisting comment about Twisted vs. Erlang

Drew Smathers drew.smathers at gmail.com
Tue Sep 29 15:22:35 EDT 2009

On Tue, Sep 29, 2009 at 2:16 PM, Alec Matusis <matusis at yahoo.com> wrote:

> I have been a long time Twisted user, and I do not know Erlang.
> I run into this interesting comment in engineering notes on Facebook Chat
> scalability:
> http://www.facebook.com/note.php?note_id=51412338919&comments
> “Leif K-Brooks
> I'm curious whether you considered using the Python library Twisted
> (http://twistedmatrix.com/) before deciding on Erlang. Its architecture is
> also supposed to be able to support a large number of concurrent
> connections. I would be interested in hearing about any issues you
> discovered with it.
> February 18 at 3:17am · Report
> Lawrence Oluyede
> TwistedMatrix does not possess the capabilities of Erlang, not even close.
> February 18 at 4:35am · Report
> What do you guys think?
I remember reading that comment and sighing to myself.  First of all:

1. Twisted is a framework for event-driven programming
2. Erlang is a programming language / VM

So any comparison between the two doesn't make much sense.

Secondly, the use of the term "TwistedMatrix" indicates pretty strongly that
the poster knows next-to-nothing about Twisted.    At surface level the
comment is completely unqualified, lacking any detail.

<sarcasm>It doesn't "possess the capabilities" of Erlang?  So Erlang has
some unspecified capabilities (they most be really important ones) that
Twisted obviously does not.  That's great to know.  Thanks for the detail
there Mr. Oluyede.</sarcasm>

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

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's not much fun if programming is your livlihood moreso than a hobby.

Personally I prefer Python to Erlang accepting the performance trade-off.
There's more choices when it comes to open-source libraries for the language
and it performs well enough.  I'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've run
into in our application have always been at a layer above Twisted (i.e. our
shit that's broken, not Twisted).  It performs, it's stable.  So ... what
are my motiviations for abandoning Python/Twisted in favor or Erlang?

Let me just say though that I really like Erlang.  I think it'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: http://erlware.org/erlware/index.html), so it might
not be long before there are as many or more library choices for Erlang as

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.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://twistedmatrix.com/pipermail/twisted-python/attachments/20090929/8efee957/attachment.htm 

More information about the Twisted-Python mailing list