On 03/15/2010 08:56 PM, Joost van der Sluis wrote: >> Another example (avoiding any hardware binding) would be a simple http >> chat cgi. >> > Not without polling > >
I'm not sure what you mean by "polling" here. Of course a chat CGI (and the other examples I mentioned) do need polling for remote updates of the web page by Java script on the Browser site to avoid HTTP timeout. To avoid unnecessary communication, AJAX/Comet can be used to create "hanging" HTTP requests that only are answered by the CGI program when an update is available or before a timeout hits. OTOH with the standard CGI paradigm, with each HTTP communication the CGI program starts and finishes. So the CGI program does not have any permanent "states". Thus a "chat" would need to store the text to be transferred in a file or a database, creating a huge overhead. With the "persistent" CGI paradigm, the CGI program keeps living and can transfer the text it received from one user to the other just by managing the requests that come in from the web server as byte streams. The NoGUIApplication package, I am planning, will allow for doing such persistent CGI applications. I feel that you could create a very viable enhancement for WebDesign, optionally enabling persistent CGI, using NoGUIApplication. So I'd be happy if you can test this, once I'm able to provide a working version. -Michael -- _______________________________________________ Lazarus mailing list [email protected] http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
