Holding the connection untill there is some data to be sent

Chris Hondl chris at imvu.com
Wed Aug 2 13:53:03 UTC 2006

We wrote a plugin to Perlbal to handle exactly this case.  The plugin waches
a flag stored in memcached.  When the flag indicates there is new data, the
plugin either releases the connection to proxy back to our app server (PHP
for us) or immediately returns a result to the client based on the memcached
data.  We've seen tremendous performance improvements with this approach -
we've cut the number of machines required to host the chat part of our
application by about a factor of 5.

Our plugin code is specific to our protocol, but would be a decent example
from which to write a plugin for your case.  The async memcached client has
been in production without significant issues for 6 months and would be
completely reusable to other applications.

I've been meaning to publish this code (along with our new Mogile plugin for
perlbal).  I'll do this today and post again to the list with a link.


On 8/2/06, Abhishek Pokharna <pokharnaabhishek at yahoo.co.in> wrote:
> Hi,
> Our protocol is based on XML over HTTP. Clients polls the servers(we are
> using JBoss servers)  to check if there is some new data.
> Is there a way by which we can use perlbal to hold the HTTP connection
> untill there is some data to be sent to the client?
> Thanks
> Abhishek
> ------------------------------
> Here's a new way to find what you're looking for - Yahoo! Answers<http://us.rd.yahoo.com/mail/in/yanswers/*http://in.answers.yahoo.com/>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.danga.com/pipermail/perlbal/attachments/20060802/a35dbae6/attachment.htm

More information about the perlbal mailing list