[FASTCGI] FastCGI, Comet and Client Link failure

Howard May Howard.May at dialogic.com
Thu Jan 14 10:56:47 EST 2010


Hi Jay,

Have a look at "http://en.wikipedia.org/wiki/Comet_(programming)" to see how HTTP transactions can be used for server push events. A common application of this sort of technology is browser based web chat.

My understanding is that this is possible with fastCGI but as I've explained I am unsure about this specific aspect.

Cheers


________________________________
From: Jay Sprenkle [mailto:jsprenkle at gmail.com]
Sent: 14 January 2010 15:48
To: Howard May
Subject: Re: [FASTCGI] FastCGI, Comet and Client Link failure

HTTP is by design transactional. You make a request, get a response, and the connection can then close without hurting anything. Do you want something that's more permanently connected or just to deliver a file? There are methods designed for delivering file content and even restarting lost connections.
On Thu, Jan 14, 2010 at 9:37 AM, Howard May <Howard.May at dialogic.com<mailto:Howard.May at dialogic.com>> wrote:
Hi Jay,

I start a new comet connection after I accept a FCGX_Accept_r returns a FCGX_Request with a URL of "http://<my server>/new_comet_connection_please". I can then send chunks down this connection using FCGX_FPrintF. I do not call FCGX_Finish_r for this request because I want to leave the HTTP transaction open for further data.

So fastCGI is giving me access to a new HTTP transaction and the FCGXFPrintF function allows my fastcgi application to send chunks to the web server (Abyss at present) to pass to the remote Client. So far so good. My problem is that at some point the TCP connection to the Client may die and I don't at present have any way of detecting this.

Cheers



________________________________
From: Jay Sprenkle [mailto:jsprenkle at gmail.com<mailto:jsprenkle at gmail.com>]
Sent: 14 January 2010 15:24
To: Howard May
Cc: fastcgi-developers at mailman.fastcgi.com<mailto:fastcgi-developers at mailman.fastcgi.com>
Subject: Re: [FASTCGI] FastCGI, Comet and Client Link failure

fastcgi is a transactional style application. If you want to run a persistent program you probably want the fastcgi application to communicate requests to, and retrieve status from, the daemon/service that implements your comet connection.
On Thu, Jan 14, 2010 at 6:23 AM, Howard May <Howard.May at dialogic.com<mailto:Howard.May at dialogic.com>> wrote:
Consider a simple fastCGI application with a comet connection to a remote Client. The application is periodically sending chunks to the Client but at some point the Client connection fails. How and when does the fastCGI application learn about this?





--
Cause united breaks guitars
http://www.youtube.com/watch?v=5YGc4zOqozo
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.pins.net/mailman/private.cgi/fastcgi-developers/attachments/20100114/ad50d4f5/attachment.html>


More information about the FastCGI-developers mailing list