There are many ways to have persistent downstream connections. For example, you can use a hidden iframe; or a complex XHR model that uses onreadystate to transfer partial information through your application while maintaining a connection. However, I could not find a way to make a steady upward flow in the same spirit.
If you use Connection: Keep-Alive in your upstream sense, you will not actually disconnect or rebuild each time; it's good. You can even encode your upstream in a GET request that returns an empty document
However, even though it is closed, you still do not have enough performance, low latency, and bandwidth that you can get with long, constant connections downstream.
If not, then there is another way to do this.
Here are some theories about what this type of solution will look like;
- Perhaps the ability to send a stream
mixed/multipart to the server with the boundary conditions. - It may be possible to transmit with subsequent transmission, with each subsequent fragment representing new data.
It is worth noting that, although this is possible with HTML5 or Flash, it would be extremely useful if you could disable it without the plug-ins in the ecosystem of browsers that are visible today. One of my aspirations is an experiment that allows me to smoothly implement Knuth coroutines between client and server.
Anyone have an idea about this? Thanks.
~ Chris.
source share