Re: WebSocket options?
Israel Brewster <[email protected]>
| Newsgroups | gmane.comp.python.cherrypy |
|---|---|
| Message-ID | <[email protected]> |
On Thursday, November 5, 2015 at 2:42:37 PM UTC-9, David wrote: > > Israel Brewster <[email protected] <javascript:>> > writes: > > > The cpstats one is the only one I have posted as an "issue", since it is > > the only one I have been able to track down. You may be right that it > isn't > > directly related to ws4py, but the fact remains that I can use cpstats, > or > > I can use ws4py, but not both - ws4py dies with cpstats enabled. Nothing > > else does that I can see. That particular issue I posted on the issues > > list, this list, the ws4py list, and the general python mailing list - > and > > got no responses to any of them. > > I definitely use ws4py in production and haven't had any notable issues. > I did need to expend some energy to ensure that handling lost and/or > disconnected sessions was robust, but nothing that I felt was an issue > with ws4py, just the nature of WebSockets in general (or rather to be > fair, any long-lived socket approach). > I'd agree with that. My issues arise from things like the socket still being up, and the client receiving messages sent from the server, but the server not getting messages sent from the client - including the close message when the client terminates the socket. Or, of course, the CLOSE_WAIT sockets I have mentioned. Neither of those fall under the category of "nature of WebSockets in general" unless WebSockets simply aren't ready for prime time. What OS are you running on? Version of CherryPy/ws4py/Python? What sort of load? I've found better success running under Mac OS than under CentOS 6, so apparently the operating system at least makes a difference. > > I have no experience trying to mix with cpstats, but is there actually > use for cpstats on URLs on which you are using WebSockets - I wouldn't > think it would make much sense. > > So what happens if you just ensure you don't have any URL where you > overlap both tools? I'd think the only URL that needed the WS tool (and > not the cpstats tool) would be the one where you handle the transition > to the WebSocket. > Admittedly, I just enabled cpstats on the root URL. I didn't try explicitly disabling it on the web socket url's - that could potentially fix the problem. All that said, as you can see in the previous reply to this thread the author of ws4py admits that it was just a learning project, and not a top priority. As this is a mission-critical piece of software for the company, and I can't be relying on software that may be abandoned, I spent today re-implementing the web socket portions of the code in tornado, which handles web sockets natively. So far, it just works - reliably, both ways, with about half the code I had to write to get ws4py working semi-reliably. So I'm abandoning ws4py. Thanks for trying though - I do appreciate your time. > -- David > > -- You received this message because you are subscribed to the Google Groups "cherrypy-users" group. To unsubscribe from this group and stop receiving emails from it, send an email to cherrypy-users+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/[email protected] To post to this group, send email to cherrypy-users-/JYPxA39Uh5TLH3MbocFF+G/[email protected] Visit this group at http://groups.google.com/group/cherrypy-users. For more options, visit https://groups.google.com/d/optout.