ws4py has been working out pretty well for us, but there's one serious problem with the ws4py CherryPy libraries: they're one-thread-per-websocket. This will never be a problem with most of the websites we commonly build; it's hard to imagine most of my websites ever having more than 100 simultaneous visitors, which ws4py could certainly handle.
But if I wanted to build a site that could handle heavier load, it's hard to imagine how one-thread-per-connection could possibly hold up. Since ws4py already has a tornado handler, we know its classes are written to be able to take advantage of select/epoll async i/o. So all that we'd need to do is write a different CherryPy plugin and use that instead of the ws4py-provided one, which still calls into ws4py for all of the protocol stuff.
The steps would probably go something like this:
write a basic performance stress testing script
see how well the current system performs
write the new plugin and see how well it performs at the same load and at really high loads
It seems reasonable to expect to be able to handle at least 1 thousand simultaneous websocket connections. Ideally it would be more, but I'd settle for a thousand :)
ws4py has been working out pretty well for us, but there's one serious problem with the ws4py CherryPy libraries: they're one-thread-per-websocket. This will never be a problem with most of the websites we commonly build; it's hard to imagine most of my websites ever having more than 100 simultaneous visitors, which ws4py could certainly handle.
But if I wanted to build a site that could handle heavier load, it's hard to imagine how one-thread-per-connection could possibly hold up. Since ws4py already has a tornado handler, we know its classes are written to be able to take advantage of select/epoll async i/o. So all that we'd need to do is write a different CherryPy plugin and use that instead of the ws4py-provided one, which still calls into ws4py for all of the protocol stuff.
The steps would probably go something like this:
It seems reasonable to expect to be able to handle at least 1 thousand simultaneous websocket connections. Ideally it would be more, but I'd settle for a thousand :)