I've got a requirement where I have to send continuous updates to my clients. Client is browser within this situation. We've got some data which updates every sec, so once client connects to the server, we conserve a persistent connection and pushing data towards the client.

I'm searching for suggestions of the implementation in the server finish. Essentially things i require is this: 1. client connects to server. I keep up with the socket and metadata concerning the socket. metadata consists of what updates have to be send for this client 2. server process now waits for brand new client connections 3. Another process may have their email list of all of the electrical sockets opened up be going through all of them and send the updates if needed.

Are we able to make a move such as this in Apache module: 1. Apache process will get the brand new connection. It keeps the condition for that connection. It keeps the condition in certain global memory and returns to root process to indicate that it's done to ensure that it may accept the brand new connection 2. the Apache process though has came back the status to root process but it's also performing in parallel where it dealing with its global store and delivering updates towards the client, if any.

So can a Apache process do this stuff: 1. Have several connection connected by using it 2. Asynchronously awaiting new connection and simultaneously processing the prior connections?

This can be a complicated and ineffecient type of upgrading. Your server will attempt to update clients which have closed lower. And also the server needs to maintain everything client data and meta data (last update time, etc).

Usually, for continuous updates ajax can be used inside a polling model. The customer includes a javascript timer that after it fires, hits something that delivers up-to-date data. The customer is constantly on the get updates at regular times without needing to write an apache module.

Would this model work with your scenario?

More reasons to opt for poll instead of push
Periodic_Refresh