I'm just at the high-level of forming a concept here, so I'm really just looking for thoughts/ideas/suggestions about how this might be done -- if there's already something that does this, if I need to roll my own, or if maybe there's a couple separate projects that could be cobbled together to achieve this. Any and all input is appreciated :)
What I'd like to be able to do is have a "stream" (not sure what else to call it) broadcast? of data that will be served over an HTTP connection. This stream will serve events/updates/other data to clients that have subscribed to it (doesn't matter really what the data is, just that the client has subscribed in some fashion). This is nothing even remotely new, but what I'm having trouble tracking down is a way for multiple users/clients/connections to basically share the same stream/connection. In other words, I'm looking for a way for a web server to basically send data once and have all subscribed clients receive it. This way, for high-traffic applications, the web server doesn't have to send data explicitly to each and every listening connection.
I really hope that made sense.
- Are there webservers/webserver-plugins that can already do this?
- Would it be possible/feasible to adapt some form of video streaming library to achieve this?
- Is this something I'll probably have to manage on my own (code that tracks subscribed connections, receives new data from some other service, and transparently replicates said data to each individual connection)?
- Any other ideas, thoughts, concerns, caveats, etc?