[Catalyst] Push services with catalyst

Brian Kirkbride brian.kirkbride at deeperbydesign.com
Wed Mar 5 18:39:10 GMT 2008


Moritz Onken wrote:
> Hi,
> 
> I consider offering a push service for real-time data. It's AJAX based 
> and requires a consistent connection.
> I'm not sure about the memory usage of this. I plan to run the catalyst 
> app as fastcgi server. Does every consistent connection create an extra 
> fastcgi process? Which means an additional ~30mb (if that's the size of 
> a fastcgi process)?
> 
> moritz

If it's AJAX then you are really polling as opposed to pushing.  In 
this case Lighttpd or Nginx are your friends.  They can handle all of 
the connections (with a long KeepAlive) and only talk to the backend 
FastCGI when a poll request comes through from the AJAX client.

If you're really pushing with a constantly connected client, you'll 
need a FastCGI process per client.  The difference is who initiates 
communication over the channel.  If the server can send to the client 
at any moment, that's true push.  Most people get along with a rapidly 
polling client that says "Anything for me?" every so often.

In general polling is wasteful of bandwidth, while push is wasteful of 
server-side resources.

Best,
Brian



More information about the Catalyst mailing list