[Lazarus] New application type: HTTP standalone server
Michael Schnell
mschnell at lumino.de
Mon Jun 6 14:18:21 CEST 2011
On 06/06/2011 12:42 PM, michael.vancanneyt at wisa.be wrote:
> By all means, you can do so, just don't expect me to create the event
> queue
Of course not if you don't need it for your projects. :)
As you know, for me it's a major design flow of the LCL, that the event
queue is implemented separately within any Widget Type, instead of being
a central object that offers appropriate hooks to all Widget Types
(maybe "Windows" should better stay outside here.) With this in place,
you would not need to bother :).
> None of this requires the use of event queues or timers ?
Of course they do: the free running "embedded" functionality performs
lot of stuff on in timed cycles and as a result of events generated by
Threads.
Of course all this can be implemented according to other design
paradigms, but the beauty of programming in Object Pascal / Lazarus /
Delphi is doing as much as possible in main thread events and with that
being freed from bothering about mutual access to objects (and using
threads only very thoughtfully when it really makes sense), while not
needing to bother about "busy" polling loops killing the system
performance and/or leading to larger latency. OTOH, when porting Delphi
projects, using this paradigm is a must anyway.
> I do client/server programming quite a lot. All our apps are 3-tier.
> Server services are heavily threaded. None of them has a timer on the
> server, or an event queue. (unless you see the socket listener as an
> event queue)
I do know that there are other programming paradigms than the "event
driven" one suggested by the Delphi creators (supposedly they did have
forerunners) but ... (see above).
Thanks for listening.
-Michael
More information about the Lazarus
mailing list