[Twisted-Python] Twisted's ability to handle many open connections.
Terry Jones
tcj25 at cam.ac.uk
Wed Apr 26 17:35:21 MDT 2006
Hi Matt. Thanks for your answer too.
>>>>> "Matt" == Matt Goodall <matt at pollenation.net> writes:
>> If that's the case, how does Twisted (portably) allow for a large number of
>> file descriptors?
Matt> As you recognised, Twisted uses a select loop so I'm not quite sure what
Matt> your question means.
You get to it below.
Matt> You will need to understand event driven programming to scale up,
Matt> otherwise you're likely to block the application from doing more than
Matt> one thing at a time (in the cooperatively multitasking sense) making
Matt> your application utterly unscalable.
I'm already a believer, no problem there.
Matt> Also, note that Twisted does not magic away other common problems
Matt> associated with scalability. The obvious one that springs to mind
Matt> (because it bit me recently :-/) is the maximum number of file
Matt> descriptors a non-root Linux process can open per process.
Right - that was what I was referring to originally. Sorry that wasn't
clear.
Matt> There is absolutely a 1-1 relationship between connections and file
Matt> descriptors but Deferred have nothing to do with it.
OK.
Matt> Hope it did help!
Yes. Plus, it's nice to see how quickly a mailing list reacts when you're
thinking of using a new product :-) Twisted has a bit of a reputation for
being obscure, but it looks much better to me than any alternative - at
least for serious networking tasks (not just serving web pages fished up of
the nearest database). I have high hopes.
Anyway, thanks again.
Terry
More information about the Twisted-Python
mailing list