Currently, the company I am employed at relies on Perl for all backend tasks. However, we are interested in implementing real-time communication between server processes and connected clients through web browsers.
We currently use Apache as our web server with mod_perl. My main question is whether there is a practical way to integrate a WebSocket server into this setup that I may not be aware of.
One solution that seems promising is Mojolicious, but I am not very familiar with it yet. Can Mojolicious be used in conjunction with my current mod_perl environment? Would it need to run as a standalone web server process?
This leads me to my second question. What is the best approach when dealing with multiple Perl files running on Apache/mod_perl, where updates need to be pushed to connected users? Currently, we are using ajax polling, but I wonder if there is a more efficient method.
The challenge I face is how these scripts would communicate with a separate WebSocket server if one were implemented. Would communication be done through pipes, sockets, or shared memory?
If I were to opt for an independent WebSocket server, could it be written in any language like Ruby or Node.js? Or is there a better solution that integrates well with existing Perl/mod_perl structures?
TL;DR
Is it advisable to have a standalone WebSocket server that communicates with both Apache/mod_perl scripts and their connected clients?