[Lazarus] Converting Pascal Client/Server application into Web Client?
Michael Van Canneyt
michael at freepascal.org
Tue Oct 5 10:10:09 CEST 2010
On Tue, 5 Oct 2010, Michael Schnell wrote:
> On 10/01/2010 05:11 PM, Michael Van Canneyt wrote:
>> Define excessive polling ?
> IMHO, any "dump" polling is excessive. IMHO, a decent method needs to "sleep"
> most of the time in a polling cycle (not generating CPU or network traffic)
> and the asynchronous event needs to "wake" the process. This is the only way
> to provide both low latency and low overhead.
>> 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.
>>
> Yep ! HTTP is essentially not suitable for this. You would be much better off
> using normal bidirectional TCP/IP communication. It's only because of the
> dump IP departments that this silly http add-ons are necessary.
Even so, we use TCP/IP communication: same problems. Faulty firewalls and
switches. I suspect that in 25% of cases, things go wrong if you work over
internet. Hardly noticeable for HTTP with its small requests (and of course
all ISPs make sure HTTP traffic gets priority) but a major mess if you use
regular TCP/IP. You're better off with UDP these days.
Things may be better on intranets, but for internet persistent connections
are a faraway dream. We had to spend lots of time on a
error-detection + reconnect scheme to work around all problems.
Michael.
More information about the Lazarus
mailing list