<br>We wrote a plugin to Perlbal to handle exactly this case.&nbsp; The plugin waches a flag stored in memcached.&nbsp; 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.&nbsp; 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.
<br><br>Our plugin code is specific to our protocol, but would be a decent example from which to write a plugin for your case.&nbsp; The async memcached client has been in production without significant issues for 6 months and would be completely reusable to other applications.
<br><br>I've been meaning to publish this code (along with our new Mogile plugin for perlbal).&nbsp; I'll do this today and post again to the list with a link.<br><br>Chris<br><br><div><span class="gmail_quote">On 8/2/06, <b class="gmail_sendername">
Abhishek Pokharna</b> &lt;<a href="mailto:pokharnaabhishek@yahoo.co.in">pokharnaabhishek@yahoo.co.in</a>&gt; wrote:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div><div>Hi,</div>  <div>Our protocol is based on XML over HTTP. Clients polls the servers(we are using JBoss servers)&nbsp;&nbsp;to check if there is some new data.</div>  <div>&nbsp;</div>  <div>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?
</div>  <div>&nbsp;</div>  <div>Thanks</div></div><div><span class="sg">  <div>Abhishek</div></span></div><div><span class="ad"><p> 
        

        
                </p><hr size="1"> 
Here's a new way to find what you're looking for - <a href="http://us.rd.yahoo.com/mail/in/yanswers/*http://in.answers.yahoo.com/" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">Yahoo! Answers</a>
 
<p></p></span></div></blockquote></div><br><br clear="all"><br>-- <br><a href="http://avatars.imvu.com/chris">http://avatars.imvu.com/chris</a>