On Fri, 1 Oct 2010, Michael Schnell wrote:
On 10/01/2010 02:22 PM, Michael Van Canneyt wrote:
ExtJS has no such mechanism to my knowledge, but I'm not a reference.
last time I checked some months ago it was said to be a new feature, but
should work, even though I did not find anybody who has tested it.
This is necessary to overcome the asymmetry of the http protocol.
IMHO "Server-Events" are necessary to design a CGI program with some
complexity.
Well, I create seriously complex applications. No such mechanism was
necessary till now.
Hmm, How to do notify the user that the server has finished complex work in
the background without blocking the interface and/or creating excessive http
polling traffic ?
Define excessive polling ?
An easy to do (non complex) example for a good application for such a method
is a server that allows tow client to chat.
Moreover "server-Internal-Events" like from Timers, serial or "direct"
TCP/IP communication, thread-notification, ... are very desirable and
should be able to fire "server-events" towards the client.
Why ? What could you possibly need to do that the server needs to contact
the client ? Everything you need can be programmed in the client, in my
experience.
Above trivial example ("chat server")
Real-world: Imagine an "embedded" program automatically working with some
hardware interfaces and/or serial and/or TCP/IP connections. Now you want to
provide it with a "web" interface that allows a "user" to connect to it and
do configuration and monitoring. For monitoring this method is essential:
many "states" in the program permanently change due to the work of the
program and the external situation. These state changes need to be shown in
the remote browser with low latency and without excessive communication
overhead.
In my experience: keeping a connection open IS excessive communication overhead
and very unreliable to boot.
I thought like you, 12 years ago. Till reality kicked in. Faulty switches,
company firewalls and whatnot. Not all servers/firewalls support HTTP 1.1
(for a persistent connection) etc. Too many problems.
So you end up with polling anyway. 10 polls per second is enough to fool the
human eye and doesn't stress the server too much.
Michael.
--
_______________________________________________
Lazarus mailing list
[email protected]
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus