[Lazarus] The future of desktop
Andrew Brunner
atbrunner at aurawin.com
Fri Nov 29 14:46:30 CET 2013
On 11/29/2013 03:28 AM, Michael Schnell wrote:
> "Responsiveness" (the program reacts to user input) is not the problem
> I meant to describe but the ability of the program to issue "state"
> messages spontaneously. This is hampered by the missing symmetry of
> the http protocol: The client needs to poll for such "reverse" messages.
>
I wanted to make 2 points here...
1.) This can be mitigated with existing HTTP protocol if you have
control over the server. For instance, with Aurawin SCS if a request
comes in with access to the "core" I set a flag in the sockets engine
that says keep this socket stream infinitely open. This way HTTPS
re-negotiation is a thing of the past, and requests are instant.
2.) Your web browser is key here. Chrome keeps socket sessions
cached. So more often than not there already is a connection made.
Meaning in the JS code, if you say XMLHTTPRequest(/server/core/command)
it just creates a string and sends it to the server. That
XMLHTTPRequest does not imply a new HTTP connection.
> This can partly be improved by techniques like "comet" that leave a
> http protocol open in a somewhat "non-standard" way. But AFAIK, this
> does result in certain problems.
"Non-standard" is a subjective term. However, there is presently
WebSockets that standardizes HTML5 event driven socket communication to
exactly address this entire point.
--
Andrew Brunner
Aurawin LLC
512.850.3117
https://aurawin.com/
Aurawin is a great new way to store, share and enjoy your photos, videos, music, and more.
More information about the Lazarus
mailing list