[Simpleweb-Support] parallelism?
Brought to you by:
niallg
From: Juraj B. <ast...@gm...> - 2007-01-16 18:04:21
|
Hello, I am writing a ProtocolHandler, which basically works, but is quite slow. I would like to ask, if handle() method is launched in separate thread or not (i.e. if it can block, or I should create a new Thread and do my work there). I have an application, which have two states, in one, it can return from handle immediately (returning static redirect) and in other mode, it has to block, so I would like to manage, when to create new thread and when not in a new thread (it is not a good idea to create new thread just for returning simple static string). Is there some performance tuning howto? I would like to handle thousands of connections. One part of my application is a reverse proxy. Has someone done that before? Currently I am using new socket per request, which is of course not very effective... Thank you, Juraj. |