Hi Nikhil,
I am in the phase of development of TCP server on Windows. The server should
efficiently handle thousands of concurrent TCP connections. When I was looking
for network libraries to avoid development efforts at low level, I came across
LIBUV as a stable candidate and your book on the same :-)
I was going through your book on LIBUV. You mentioning: "Networking in libuv is
not much different from directly using the BSD socket interface"
This made me little worried. I heard LIBUV encapsulates IOCP and its easier to
work with LIBUV than working directly with BSD sockets. While, working directly
with BSD sockets involves understand nitty gritty of the IOCP, thread pools and
all that stuff.
Ok. Despite of this, let me try to put my query in shortest possible way:
In the tcp-echo-server/main.c, we start listening and get callback
on_new_connection for each new connection. Similarly, echo_read is callback we
get when each client sends us request.
Now as long as catering few thousands of connections is concerned, my question
is:
Does the library takes care of all aspects of the performance (viz. threads and
number of CPU cores, threadpool, IOCP etc.) and we end up getting "new
connection", "client request" events nicely and we just need to process them
OR
We can (or need to) do more (threads etc) in this piece of code from efficiency
and performance perspective?
Thanks,
Atul D. Patil