Ladies and Gents, I have been working on an application that incorporates a web socket route. The web socket route starts up a Mojo::IOLoop->recurring that polls a database for changes. The web socket works just fine...no issues there, but it occurs to me that if I have a lot of web socket clients accessing this route, that essentially, I am polling the database every few seconds for each of the clients, which seems to be rather wasteful...also, not very scalable. Sure a dozen clients won't hurt my database, but what if I had a couple of hundred of them?
Is there a way to do the database polling in a single loop that then sends the notification out to all connected web socket clients? Does this need to be set up as an entirely other application that does the polling and then have the web socket route listen for messages from it? Or am I overcomplicating this horribly? Aaron -- You received this message because you are subscribed to the Google Groups "Mojolicious" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at https://groups.google.com/group/mojolicious. For more options, visit https://groups.google.com/d/optout.
