Opened 17 years ago

Closed 11 years ago

#1020 enhancement closed invalid (invalid)

[NEED HELP] Evangelise async design

Reported by: hypatia Owned by:
Priority: normal Milestone:
Component: core Keywords: documentation
Cc: itamarst, Predictive, kragen, Thijs Triemstra Branch:


Change History (12)

comment:1 Changed 17 years ago by hypatia

This is one of the suggestions from issue 1015.

"Answer the question; 'What's the point of going to all this trouble for an
async design when 'regular' coding is so much easier?' Even a simple link to
the C10k page would help ('Why Use Twisted' is a good spot for it).  Lots of
people hear that Twisted is a great networking toolkit, but come expecting
something more akin to Net::X modules on CPAN and not a plunge into learning
about asynchronous design."

This is actually not an area I have expertise in. There is some scattered
justification in the docs that seems to centre around race conditions, deadlocks
and the GIL. I'll see what I can come up with in unifying this. Suggestions

comment:2 Changed 17 years ago by itamarst

1. scalability; see c10k page, plus python maks it worse since threads don't run
in parallel ("GIL") so don't get benefits from multiple CPUs.
2. lack of race conditions.
3. Some protocols are really hard to do with blocking APIs (e.g. think about how
you'd implement chat server if you had only threads and blocking read and write).

comment:3 Changed 17 years ago by itamarst

Or well, less race conditions. Makes concurrency a much easier problem since you
can;t be interrupted at any point, only at event handler borders (or in defgen
when yielding Deferred).

comment:4 Changed 17 years ago by hypatia

Thanks Itamar, that should be enough for a respectable write-up.

comment:5 Changed 17 years ago by itamarst

I hope that wasn't sarcasm? :) I was going to add more detail later if needed.

comment:6 Changed 17 years ago by hypatia

Not sarcasm! The more info I have the easier it is, but I should have the minium
required now to write something sensible.

comment:7 Changed 17 years ago by kragen

Is there a URL where the result of this effort will appear?

The best thing I've found so far along these lines is Zooko's 2001 article, "Why
Multithreading Sucks, Using Mojo Nation As An Example," at

comment:8 Changed 16 years ago by hypatia

Cc: hypatia removed
Component: conch
Owner: changed from hypatia to edsuom

comment:9 Changed 16 years ago by Jonathan Lange

Component: conchcore

comment:10 Changed 13 years ago by Thijs Triemstra

Cc: Thijs Triemstra added

comment:11 Changed 11 years ago by Glyph

Resolution: invalid
Status: newclosed

Not really a problem with Twisted as such, more an issue with programmers' brains.

This should just be done as necessary in the various documents that describe how the reactor works. I don't see how we could ever close this ticket.

comment:12 Changed 11 years ago by <automation>

Owner: edsuom deleted
Note: See TracTickets for help on using tickets.