Stefano Bagnara wrote:
Hi all,
Hi Stefano,
WDYT? Is this an useless approach? Does it worth using continuations
and SEDAified protocols instead of 1 thread per connections or the
continuations overhead is greater than the thread overhead?
This is very interesting. I'm wondering it it can be used to solve a
problem we have with slow clients : if you build a server which process
a lot of // requests, with some very expensive ones, you usually use a
pool of thread to process the incoming requests, expecting that fast
requests will be processed fast enough to free a thread for the next
request. But if you have a very slow request, which will push a very
long response, you may use a thread for a very long time. If you have
many of those long requests, you can simply kill the server by thread
starvation.
Using such a mechanism where a continuation is created, and awakened
when a WriteFuture as completed, you will avoid such a starvation if I'm
not wrong.
thoughts ?
Stefano
--
--
cordialement, regards,
Emmanuel Lécharny
www.iktek.com
directory.apache.org