[python-win32] A shameless COM question

Marcus Low marcus at internetnowasp.net
Thu Apr 3 10:08:38 CEST 2008


Hi Waldemar,

Thanks, i have bought the twisted book and the journey  begin. The COM was 
optimal for windows because its asynch api winsock2 and
that beats berkeley socket "select" anyday on Windows, but your hint on the 
IO completion port gives twisted an equal footing in terms of raw 
efficiency.
I also agree with Tim that there is a much bigger team on twisted and hey at 
least you guys did respond on my shameless questions ;-)

Yes, i will do a mock up server and bombard it and see for myself if this is 
viable.

Marcus

----- Original Message ----- 
From: "Waldemar Osuch" <waldemar.osuch at gmail.com>
To: "Marcus Low" <marcus at internetnowasp.net>
Sent: Thursday, April 03, 2008 11:57 AM
Subject: Re: [python-win32] A shameless COM question


> On Wed, Apr 2, 2008 at 2:38 AM, Marcus Low <marcus at internetnowasp.net> 
> wrote:
>
>>
>> >  Are you are the only Python guy in the sea of .Net programmers?
>> >  Do you have to fight political battles about technology in your 
>> > office?
>> >  Is the deadline looming?
>> >  Do you have patience to learn "Twisted way" of programming?
>> >
>>
>>  Actually i am the Project director ,
>
> Well that takes care of the first two questions :-)
>
>>  we have our own mail servers written 8
>> years ago and serving many windows companies. But the time
>>  has come to rewrite one based on all the requirements and problems we 
>> have
>> documented and collected, even on software like smartermail, imail
>>  there are just too much requirement in our list that it completely
>> justifies a rewrite. (as you notice i am all into Windows market)
>>
>>  I have given my team a strong mandate that all programming must be done 
>> in
>> C# and only drivers will remain as C/C++ (prev everything is C/C++)
>>  for one reason, productivity. That was until one of my  "fun time" of
>> learning something new was python ..
>>
>>  So on one hand yes i have can steer the whole team on pythonwin, on the
>> other hand being a "windows based" market, i thought that using the COM
>>  on python would give me the case.
>>
>>  I require that the mailserver needs to handle 1000 concurrent
>> connections...and the python code will still need to call logging, AV 
>> scan,
>> antispam apis etc.
>
> In my opinion Twisted based mail server would be able to handle it.
> But do not take my word for it.  Maybe ask on Twisted mailing list.
>
> The good news is that the latest release includes a rewrite of IOCP
> reactor that promises to be much better performing on Windows
> than the default "select" reactor.
>
>>
>>  Will the GIL be a problem here?
>
> No I do not think so.  Twisted is a single threaded, asynchronous
> server.  You may dispatch blocking calls (database queries, spam
> checks, expensive
> calculations) to a thread pool using deferToThread calls but the main 
> reactor
> loop stays single threaded at all times.  Most of the time one is
> waiting for the
> network anyways.
>
>>
>>  Do you still recommend Twisted ? I have no problem spending whole week
>> mastering twisted in office and home if it can handle my criteria.
>>
>
> I would still recommend it but I am biased.
> Would I base my new product on the technology I just learned in a week?
> Probably not, but I would consider writing a throw away prototype to see
> how it performs.  Twisted is "good technology" and worth exploring.
>
> Twisted can be a little bit daunting to learn at the beginning.  At least 
> it
> was for me.  The "finger" tutorial helped me tremendously to wrap my head
> around how Twisted does things but still it took me long time to "get it".
> I'm I an expert now? No, but I have learned enough to have confidence
> in the approach taken by Twisted developers. 




More information about the python-win32 mailing list