netom / pyicap

A lightweight python framework for writing ICAP services
Other
105 stars 52 forks source link

Easy async support? #22

Open potchin opened 7 years ago

potchin commented 7 years ago

Not exactly an 'issue' but more of a question.. Is there any easy way to get this running asynchronously? The Sockerserver threading and forking mixins obviously spawn threads/processes for each tcp connection. Is there a dropin async replacement?

netom commented 7 years ago

I found no true drop-in replacement, however there is asyncore, an asynchronous socket framework.

I imagine someone could create an asynchronous mixin to be used with SocketServer, this would be a good drop-in replacement of the currently used threading solution.

We could also just use pure asyncore and decouple PyICAP from the SocketServer library so it easily could be used with both.

I'll try to figure out a working example in the near future.