Chris Knipe
2014-08-28 14:19:47 UTC
Hi All,
I've looked at Net::Server (and have my "new" server with some 20K lines of
code written in it that we're currently finalising), POE, and a few other
things, but I cannot find what I am looking for. I'm hoping for some
assistance / pointers please. I am looking for the following simple
scenario.
On the server side, read data through the socket (for simplicity, let's say
"commands" are terminated by \n)
On the client side, send numerous commands to the server, WITHOUT waiting
for a response - that's simple enough.
Now, let's say the server sleep($randomtime) between commands to simulate a
work load. I effectively want the following
C> Do 1
C> Do 2
S> Done 1
C> Do 3
C> Do 4
S> Done 4
S> Done 2
S> Done 3
I know this sounds simple, but can anyone give a rough example of the server
code (even if it's just an echo with a random sleep). For the love of. I
cannot seem to stop the synchronous nature of POE, or Net::Server. The
whole wait for input, deal with input, write output thing is really blocking
my application's performance, seriously, at this point in time. I need to
be truly asynchronous.
I need to also preferably need to use PreForks. The application needs to
deal with some 500Mbps in terms of bandwidth on the sockets, and a good
amount of thousands of concurrent connections. Again, I'm not sure whether
Net::Server will scale (we're developing / debugging currently, whilst in
production we currently use xinetd).
Many thanks,
Chris.
I've looked at Net::Server (and have my "new" server with some 20K lines of
code written in it that we're currently finalising), POE, and a few other
things, but I cannot find what I am looking for. I'm hoping for some
assistance / pointers please. I am looking for the following simple
scenario.
On the server side, read data through the socket (for simplicity, let's say
"commands" are terminated by \n)
On the client side, send numerous commands to the server, WITHOUT waiting
for a response - that's simple enough.
Now, let's say the server sleep($randomtime) between commands to simulate a
work load. I effectively want the following
C> Do 1
C> Do 2
S> Done 1
C> Do 3
C> Do 4
S> Done 4
S> Done 2
S> Done 3
I know this sounds simple, but can anyone give a rough example of the server
code (even if it's just an echo with a random sleep). For the love of. I
cannot seem to stop the synchronous nature of POE, or Net::Server. The
whole wait for input, deal with input, write output thing is really blocking
my application's performance, seriously, at this point in time. I need to
be truly asynchronous.
I need to also preferably need to use PreForks. The application needs to
deal with some 500Mbps in terms of bandwidth on the sockets, and a good
amount of thousands of concurrent connections. Again, I'm not sure whether
Net::Server will scale (we're developing / debugging currently, whilst in
production we currently use xinetd).
Many thanks,
Chris.