in Education by
I have an existing PHP app running on Apache server. Question, is it possible to embed say Socket.IO Client-side JS by "Proxy-Pass"-ing to NodeJS server? Say, I save a key-value pair with PHP in DB, and simultaneously send that message to everyone connected to that channel, the value I just saved. If I was using NodeJS and Socket.IO/Faye I would embed the client-side JS in the pages served by Apache. But essentially that script comes from Proxy-Pass to NodeJS. Some light on this would be very kind. Thanks JavaScript questions and answers, JavaScript questions pdf, JavaScript question bank, JavaScript questions and answers pdf, mcq on JavaScript pdf, JavaScript questions and solutions, JavaScript mcq Test , Interview JavaScript questions, JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)

1 Answer

0 votes
by
There is a similar question here: Accessing socket.io server via Apache served pages You can achieve this using Apache, but I think it would be better to either connect to Socket.IO directly or use something better for proxying like HAProxy: HAProxy + WebSocket Disconnection I would choose HAProxy and use a port such as 4000 for example especially for Socket.IO and port 843 for Flash-WebSockets (Socket.IO will check if WebSockets are available in the browser and if they're not SIO can change the transport to Flash-WebSockets; providing your transport order is WS native, WS Flash, etc): https://gist.github.com/1014904 (check HAProxy's config there for port 843). The reason for choosing HAProxy would be that I could use multiple processes across multiple machines when I need to handle big traffic, and HAProxy is very good at that.

Related questions

0 votes
    I have an existing PHP app running on Apache server. Question, is it possible to embed say Socket.IO ... Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Feb 11, 2022 in Education by JackTerrance
0 votes
    I have seen Microsoft Cognitive services such as text analytics and some other services. Here I have gone through ... much about it? Select the correct answer from above options...
asked Feb 8, 2022 in Education by JackTerrance
0 votes
    I'm trying to make a form-maker with Node.Js and MongoDB but confused about the data structure. ... JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Apr 21, 2022 in Education by JackTerrance
0 votes
    I'm new to Laravel. I am trying to download this project and build from git(https://github.com/ ... JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Jun 14, 2022 in Education by JackTerrance
0 votes
    So I'm writing a framework on which I want to base a few apps that I'm working on (the ... , JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Mar 17, 2022 in Education by JackTerrance
0 votes
    So I'm writing a framework on which I want to base a few apps that I'm working on (the ... , JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Mar 15, 2022 in Education by JackTerrance
0 votes
    Which of the following tool can be used for integrating text and code in one document? (a) knitr (b) ... questions and answers pdf, Data Science interview questions for beginners...
asked Oct 29, 2021 in Education by JackTerrance
0 votes
    Practice of developers integrating changes directly in the feature or work branches...
asked Mar 7, 2021 in Technology by JackTerrance
0 votes
    One of the main disadvantages of integrating cryptography into applications is: Please select the correct options from below (a ... , as users can no longer modify the source code....
asked Dec 11, 2020 in Education by Editorial Staff
0 votes
    How to achieve Integrating DevOps in the AppSec Pipeline?...
asked Oct 27, 2020 in Technology by JackTerrance
0 votes
    ________ procedure involves integrating secure development practices and methodologies into development and deployment ... Software development security 4. Application Security...
asked Oct 27, 2020 by JackTerrance
0 votes
    I have yet another "Can't set headers after they are sent." problem. I've created a post router ... JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Jun 30, 2022 in Education by JackTerrance
0 votes
    I am trying to add an if condition; Idea is If I enter the input as print or text with 4 in ... , JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked May 7, 2022 in Education by JackTerrance
...