tags:

views:

45

answers:

1

Hi

What library is the fastest to make hundreds of DNS queries in multi-tasking.

I've googled round DNS libraries for python. I found that adns is said to be fastest. But it's not Windows-compatible. Are there any cross-platform compatible DNS libraries for python?

+3  A: 

Twisted's DNS library is cross platform. Whether or not it's the "fastest" is debateable but Twisted performs very well on the whole. I'd be surprised if it couldn't saturate your I/O link.

One point of note though: Twisted uses asynchronous I/O rather than multi-tasking to achieve concurrency. Async I/O is a very good mechanism for handling concurrent queries but it requires a different programming style from the typcial threaded approach. The learning curve can be steep but it's fairly short and, in my opinion, it's well worth the effort.

Rakis
Thanks. By the way, I've learnt Twisted is an entire networking library. Can you suggest me what to use Twisted and when not to use it?
jack