Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
CometActors sending messages to itself
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  6 messages - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
Channing Walton  
View profile  
 More options Oct 23 2012, 10:32 am
From: Channing Walton <channingwal...@mac.com>
Date: Tue, 23 Oct 2012 07:32:41 -0700 (PDT)
Local: Tues, Oct 23 2012 10:32 am
Subject: CometActors sending messages to itself

Hi,
we have observed a problem in one of our comet actors when it sends
messages to itself: this ! foo

It looks like those messages are processed immediately and all the results
returned to the browser in one lump. However, if I use Schedule to send a
message to the actor, the results of processing each message get pushed to
the browser as each message is processed.

Is calling ! on itself a bad thing?
Am I barking up the wrong tree here? Perhaps I have another problem?

Channing


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
David Pollak  
View profile  
 More options Oct 23 2012, 7:30 pm
From: David Pollak <feeder.of.the.be...@gmail.com>
Date: Tue, 23 Oct 2012 16:30:50 -0700
Local: Tues, Oct 23 2012 7:30 pm
Subject: Re: [Lift] CometActors sending messages to itself

On Tue, Oct 23, 2012 at 7:32 AM, Channing Walton <channingwal...@mac.com>wrote:

> Hi,
> we have observed a problem in one of our comet actors when it sends
> messages to itself: this ! foo

> It looks like those messages are processed immediately and all the results
> returned to the browser in one lump. However, if I use Schedule to send a
> message to the actor, the results of processing each message get pushed to
> the browser as each message is processed.

> Is calling ! on itself a bad thing?

No.

> Am I barking up the wrong tree here? Perhaps I have another problem?

No idea. Can you put together a sample app?

> Channing

> --
> --
> Lift, the simply functional web framework: http://liftweb.net
> Code: http://github.com/lift
> Discussion: http://groups.google.com/group/liftweb
> Stuck? Help us help you:
> https://www.assembla.com/wiki/show/liftweb/Posting_example_code

--
Telegram, Simply Beautiful CMS https://telegr.am
Lift, the simply functional web framework http://liftweb.net
Follow me: http://twitter.com/dpp
Blog: http://goodstuff.im

 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Diego Medina  
View profile  
 More options Oct 23 2012, 11:54 pm
From: Diego Medina <di...@fmpwizard.com>
Date: Tue, 23 Oct 2012 23:54:36 -0400
Local: Tues, Oct 23 2012 11:54 pm
Subject: Re: [Lift] CometActors sending messages to itself

> It looks like those messages are processed immediately and all the results
> returned to the browser in one lump. However, if I use Schedule to send a
> message to the actor, the results of processing each message get pushed to
> the browser as each message is processed.

A few months ago I was doing some experiments to see how many comet
messages could Lift handle, and maybe you are seeing the same thing I
saw during those tests:

Most of the time, when I use comet, I just get one JavaScript command
per http response from the comet long pooling (when using something
like partialUpdate(SetHtml(...))
But if you go ahead and have something like a loop, with no pause in
between, and you send 300 messages to your comet actor, Lift will
group some of them into one http response, so, instead of getting 300
individual http responses, which would be slow, you may get 100 or
less (I can;t remember the real numbers), and each response will have
a group of JavaScript commands that modify the DOM.

In 2.4 we had a bug where you would get a stackoverflow with a very
high number of messages, that was was fixed in 2.5-M1

Is this grouping what you are seeing?

Thanks

  Diego

--
Diego Medina
Lift/Scala Developer
di...@fmpwizard.com
http://www.fmpwizard.com

 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Channing Walton  
View profile  
 More options Oct 24 2012, 2:05 am
From: Channing Walton <channing.wal...@googlemail.com>
Date: Wed, 24 Oct 2012 07:05:09 +0100
Local: Wed, Oct 24 2012 2:05 am
Subject: Re: [Lift] CometActors sending messages to itself
That sounds very plausible, I'll do some more experiments today to confirm.

Thanks,

Channing

Sent from my iPhone

On 24 Oct 2012, at 04:54, Diego Medina <di...@fmpwizard.com> wrote:


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
David Pollak  
View profile  
 More options Oct 24 2012, 10:58 am
From: David Pollak <feeder.of.the.be...@gmail.com>
Date: Wed, 24 Oct 2012 07:58:45 -0700
Local: Wed, Oct 24 2012 10:58 am
Subject: Re: [Lift] CometActors sending messages to itself

On Tue, Oct 23, 2012 at 11:05 PM, Channing Walton <

channing.wal...@googlemail.com> wrote:
> That sounds very plausible, I'll do some more experiments today to confirm.

There is a 50 ms (or something like 50 ms) timeout period between when the
long poll starts its clean-up and preparation to send the response to the
client and when it actually does. This is to avoid a spin situation where
there are lots of single responses that cause lots of individual http
request/responses. Perhaps you are batching up a ton of responses this way.

--
Telegram, Simply Beautiful CMS https://telegr.am
Lift, the simply functional web framework http://liftweb.net
Follow me: http://twitter.com/dpp
Blog: http://goodstuff.im

 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Channing Walton  
View profile  
 More options Oct 24 2012, 3:48 pm
From: Channing Walton <channing.wal...@googlemail.com>
Date: Wed, 24 Oct 2012 20:47:40 +0100
Local: Wed, Oct 24 2012 3:47 pm
Subject: Re: [Lift] CometActors sending messages to itself

On 24 Oct 2012, at 15:58, David Pollak <feeder.of.the.be...@gmail.com> wrote:

> On Tue, Oct 23, 2012 at 11:05 PM, Channing Walton <channing.wal...@googlemail.com> wrote:
> That sounds very plausible, I'll do some more experiments today to confirm.

> There is a 50 ms (or something like 50 ms) timeout period between when the long poll starts its clean-up and preparation to send the response to the client and when it actually does. This is to avoid a spin situation where there are lots of single responses that cause lots of individual http request/responses. Perhaps you are batching up a ton of responses this way.

Yes I think that was it - up to 100 responses queued up. We'll do something different :)

Thanks for all the help.

Channing


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »