Hi Henrik Awesome! That's really cool, thank you for your effort and for sharing the code :-) 20k message with nearly zero server load sounds very impressive.
Question: > To work around the inter-process limit of 4096 byte long messages the > router now supports storing the messages in Redis 1) Where comes this limit from? POSIX IPC? PicoLisp IPC ? 2) I couldn't find the redis part in the code, maybe you can give me a hint where to look? Thanks, your work on websockets will definitely help me in in the future :-) - beneroth ----- Original Message ----- From: Henrik Sarvell [mailto:[email protected]] To: [email protected] Sent: Fri, 26 Jun 2015 21:30:58 +0200 Subject: Hi all, after over a month without any of the prior issues I now consider the websockets part of pl-web stable: https://bitbucket.org/hsarvell/pl-web Gone are the days of 100% CPU usage and zombie processes. With Alex's help the main web server is now more stable (he made me throw away a few throws in favour of a few byes). The throws were causing the zombies. I was also including dbg.l (it was causing hung processes at 100% CPU), it's basically been deprecated or something, I'll leave it up to him to elaborate. It's just something I've been including by habit since years ago when at some point I needed to include it to do some kind of debugging. Anyway atm the WS router is regularly routing up to 40 messages per second to upwards 300-500 clients which means that roughly 20,000 messages are being pushed out per second during peak hours. The PL processes show up with 0 CPU and 0 RAM usage when I run top, sometimes 1% CPU :) They hardly register even i aggregate, the server would be running 99% idle if it was only running the WS server. To work around the inter-process limit of 4096 byte long messages the router now supports storing the messages in Redis (raw disk is also supported if Redis is not available), this is also in effect in production and is working flawlessly since months. This is how I start the WS server in production: (load "pl-web/pl-web.l") (setq *Mobj (new '(+Redis) "pl-ws-")) (undef 'app) (setq *WsAuth '(("notifications" (("send" ("put your password/key here")))))) (de app () (splitPath) (wsApp) (bye)) (de go () (wsServer) (server 9090) ) -- UNSUBSCRIBE: mailto:[email protected]?subject=Unsubscribe
