Reputation: 31
i wanna write an IM server in python, but i'm not sure if python can handle the heavy connections?
Thanks in advance.
Upvotes: 2
Views: 2861
Reputation: 3780
gevent is a Python network library based on libevent that is capable of handling thousands of connections. Read the introduction here.
Upvotes: 1
Reputation: 80061
Yes, you could :)
For example: SecondLife has written a library to support non-blocking IO, you can find it at: http://eventlet.net/
The beauty of Python is, you can optimize the code when it's needed. If some part of your code is executed a lot you can simply replace it with a C function to speed up your entire program without much effort.
Upvotes: 2