The company I'm working on uses Perl for everyone related to the backend. However, we would like to use some real-time communication between server processes and connected clients through a browser.
We also use Apache as a web server with mod.perl. So this is my first question, I donβt see a practical way to integrate WebSocket-Server in this consolidation. Maybe I haven't found one yet?
The only thing that really takes this topic seriously is Mojolicious. However, I am still not so versed in this, so I would be happy if someone could indicate if I can use this in my current mod-perl environment. I think I would also have to run this as a standalone web server process, No?
This brings me to my second question. What is the best practice if you have multiple perl files that perform certain actions on Apache / modperl, but you want all your connected users to report things. I mean, all of these scenarios are available through XHR, but some actions require other users to get information. We are currently doing the classic ajax poll.
The problem I'm struggling with is that if there is a dedicated websocket server that works independently, should all of these scripts somehow communicate with this process, and also correctly? How to do it? Pipes Outlets? Common memory?
Theoretically, if I decided to go with such an independent ws server solution, could I write it in any language? Maybe even Ruby or Node. I'm just wondering if this is the best way or if there is a good solution that is more integrated into existing perl / modperl constructs.
TL DR
Is it better to have a standalone independent web socket server that interacts with your other Apache / modperl scripts as well as with its connected clients?
source share