|
Home > Archive > Perlbal > August 2006 > Holding the connection untill there is some data to be sent
You are viewing an archived Text-only version of the thread.
To view this thread in it's original format and/or if you want to reply to
this thread please [click here]
| Author |
Holding the connection untill there is some data to be sent
|
|
| Abhishek Pokharna 2006-08-02, 1:11 pm |
| 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
| |
| Chris Hondl 2006-08-02, 1:11 pm |
| 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.
Chris
On 8/2/06, Abhishek Pokharna <pokharnaabhishek@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/yans...wers.yahoo.com/>
>
>
--
http://avatars.imvu.com/chris
| |
| Prateek Mathur 2006-08-02, 1:11 pm |
| Cool,let us know when u publish this information.Any Information on
configuring the plugin with perlbal etc could be helpful.
Thanks
Prateek.
On 8/2/06, Chris Hondl <chris@imvu.com> wrote:
>
>
> 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.
>
> Chris
>
>
> On 8/2/06, Abhishek Pokharna <pokharnaabhishek@yahoo.co.in> wrote:
>
>
> --
> http://avatars.imvu.com/chris
>
| |
| Prateek Mathur 2006-08-02, 1:11 pm |
| So generally,this will reduce the load on the app servers, but will increase
the load on the memcached server since you will be polling the flag
everytime, so in this case you would need to worry abt adding more boxes for
memcached servers in the future with increased load, instead of ur app
servers right?
Prateek
On 8/2/06, Chris Hondl <chris@imvu.com> wrote:
>
>
> 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.
>
> Chris
>
>
> On 8/2/06, Abhishek Pokharna <pokharnaabhishek@yahoo.co.in> wrote:
>
>
> --
> http://avatars.imvu.com/chris
>
|
|
|
|
|