Re: [Jsonrpc-cpp-devel] Multithreaded server
Brought to you by:
s-vincent
From: Ditwin - C. <co...@di...> - 2012-02-15 11:38:54
|
Just for information, d you have reports and statistics about that ? > I have two implementations of my website. The first uses Symfony, the second is implemented in PHP, and uses a webservice written with JSON RPC CPP. I used Apache Benchmark (ab) to compare the two versions. The second version is really faster with about 100 calls. But with a more > > So, make the Recv function to create his own thread, run it and closes >> the socket. >> > > Do you mean, create one thread per new request ? Yes. But it could be possible to create a set of initial thread when the server starts ? This could be more effective this way, rather than creating one thread, process the method, destroy the thread ... Create a new new and so on. The mutex is sometime necessary... it depends if you have objects you would > like to share between threads. > Ok, I don't need to share objects between thread, because each method create his own objects depending on the requests. |