Skip to content Skip to sidebar Skip to footer

Connection Stream

Is there another way to create a connection stream between a loaded page (client) and the server without using repeated AJAX calls, like every half second? I think of something tha

Solution 1:

I would like to recommd you Phil Leggetter's Guide to Real-time technologies - because that is what you are looking for.

You will need one of the html5 introduced connection aspects: WebSockets, Server-Sent Events or even WebRTC DataChannel could be possible if you have a peer-to-peer use case.

In reference to the above link, its always about your server setup and your use case - that in mind some commonly used technologies would be: Pusher, Firebase, Socket.io, Ratchet, etc.


Update

Server-sent-events do have more server-side compatibilitly, technically it is more like optimized HTTP streaming, you can read more details in the spec and on caniuse. If you need a constant bidirectional connection and better client side support you better go with WebSockets. But you will need to set up a compatible server or use an external service like Pusher or Firebase.

Post a Comment for "Connection Stream"