S
snacktime
I'm curious how ruby threads would do for a threaded network server.
Will reading/writing sockets in one thread block other threads? In
this application clients connect to the server via ssl and a simple
line protocol. They send requests to the server, and the server in
turn makes https connections to yet another server, gets the response,
and sends it's own response back to the client. Clients can send
multiple requests and stay connected as long as they want.
The servers that the application makes an https connection to speak
5-6 different protocols. Right now we have one application written in
perl that speaks 2 of them, and one in python's twisted that speaks
another. I want to consolidate everything into one application so I'm
evaluating my options. Perl is ok, no real complaints. Twisted is
amazingly fast for how few resources it consumes, but the code is
rather complicated and I'm not sure it's worth the extra performance.
I've used ruby for a while now but haven't used ruby threads and not
sure what kinds of issues I would run into with an application like
this. The application would need to be able to handle 20-30
concurrent clients each sending one request every 3-4 seconds. So
figure 40 or so ssl connections per second at the most plus the
connected clients, which will usually stay connected for long periods
of time.
Any advice or suggestions would be welcome.
Will reading/writing sockets in one thread block other threads? In
this application clients connect to the server via ssl and a simple
line protocol. They send requests to the server, and the server in
turn makes https connections to yet another server, gets the response,
and sends it's own response back to the client. Clients can send
multiple requests and stay connected as long as they want.
The servers that the application makes an https connection to speak
5-6 different protocols. Right now we have one application written in
perl that speaks 2 of them, and one in python's twisted that speaks
another. I want to consolidate everything into one application so I'm
evaluating my options. Perl is ok, no real complaints. Twisted is
amazingly fast for how few resources it consumes, but the code is
rather complicated and I'm not sure it's worth the extra performance.
I've used ruby for a while now but haven't used ruby threads and not
sure what kinds of issues I would run into with an application like
this. The application would need to be able to handle 20-30
concurrent clients each sending one request every 3-4 seconds. So
figure 40 or so ssl connections per second at the most plus the
connected clients, which will usually stay connected for long periods
of time.
Any advice or suggestions would be welcome.