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
Comet Update for long running ajax calls to same browser?
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
  5 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
 
Torsten Uhlmann  
View profile  
 More options Apr 28 2012, 8:53 am
From: Torsten Uhlmann <T.Uhlm...@agynamix.de>
Date: Sat, 28 Apr 2012 05:53:02 -0700 (PDT)
Local: Sat, Apr 28 2012 8:53 am
Subject: Comet Update for long running ajax calls to same browser?
Hi all,

I have a question whether it makes sense to use Comet's partialUpdate
or rather plain Ajax in the following situation:

On our site, the user can enter some piece of information which is
then ajax send to the server. Currently the call immediately returns,
which is desired.

On the server side some processing is done with that data in a
separate thread and when done the data is sent to a Comet Actor.

This actor then sends the data to the requesting user, and only to
him. There is no need to send the data to other browsers.

I choose Comet Actor for this because it takes a few seconds to
process the data, which I wanted to be done in a different thread. The
user can continue to work and when the processing is complete the data
appears in his browser.

Is that a use case for Comet (because it's only pushed to the same
browser it came from) or should I resort to plain Ajax? What's the
processing overhead for comet because it's send to every comet
listener?

If I should do that with plain Ajax, can I still process the request
in a different thread and answer the ajax call when complete?

Thanks for your help!

Torsten.


 
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 Apr 28 2012, 4:51 pm
From: David Pollak <feeder.of.the.be...@gmail.com>
Date: Sat, 28 Apr 2012 13:51:49 -0700
Local: Sat, Apr 28 2012 4:51 pm
Subject: Re: [Lift] Comet Update for long running ajax calls to same browser?

Having a CometActor per page is the right approach... and having a randomly
named comet actor per page is better so that you'll have a different
instance per page.

I don't understand how CometListener works into the design.  Why not just
send the message directly from the Ajax handler to the CometActor
associated with the page that the Ajax request came from?

On Sat, Apr 28, 2012 at 5:53 AM, Torsten Uhlmann <T.Uhlm...@agynamix.de>wrote:

--
Visi.Pro, Cloud Computing for the Rest of Us http://visi.pro
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.
AGYNAMIX Torsten Uhlmann  
View profile  
 More options Apr 29 2012, 2:32 am
From: AGYNAMIX Torsten Uhlmann <T.Uhlm...@agynamix.de>
Date: Sun, 29 Apr 2012 08:32:05 +0200
Local: Sun, Apr 29 2012 2:32 am
Subject: Re: [Lift] Comet Update for long running ajax calls to same browser?

Thanks heaps for your response, and thanks for the hint with the randomly named CometActor per page.

Now, how do I sent a message to the CometActor associated with the page the request came from?

We currently have something like this:

class NotificationsActor extends CometListener

That thing registers with a NotificationServer to whom I sent the messages. How would I send the message to the Actor directly, do I just keep a reference in a RequestVar?

Thanks,
Torsten.

--
AGYNAMIX(R). Passionate Software.
Inh. Torsten Uhlmann | Buchenweg 5 | 09380 Thalheim
Phone:       +49 3721 273445
Fax:             +49 3721 273446
Mobile:       +49 151 12412427
Web:           http://www.agynamix.de

Am 28.04.2012 um 22:51 schrieb David Pollak:


 
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.
Torsten Uhlmann  
View profile  
 More options Apr 30 2012, 5:19 am
From: Torsten Uhlmann <T.Uhlm...@agynamix.de>
Date: Mon, 30 Apr 2012 02:19:08 -0700 (PDT)
Local: Mon, Apr 30 2012 5:19 am
Subject: Re: Comet Update for long running ajax calls to same browser?
I've read into Diego's description here: http://blog.fmpwizard.com/54204619

I'm now setting a random name to my actor and i save that name in a
RequestVar and later I use

LiftSession.sendCometActorMessage(<Actor Type>, <Actor Name>,
<Message>)

to shoot the message only to that one actor.

I hope that's somewhat a sane approach.

Thanks,
Torsten.

On 29 Apr., 08:32, AGYNAMIX Torsten Uhlmann <T.Uhlm...@agynamix.de>
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.
Diego Medina  
View profile  
 More options Apr 30 2012, 7:30 am
From: Diego Medina <di...@fmpwizard.com>
Date: Mon, 30 Apr 2012 07:30:53 -0400
Local: Mon, Apr 30 2012 7:30 am
Subject: Re: [Lift] Re: Comet Update for long running ajax calls to same browser?

> I hope that's somewhat a sane approach.

Of course it is :) Joke side, I really think that this method does not have
any negative side effects.

Regards
Diego

> Thanks,
> Torsten.

> On 29 Apr., 08:32, AGYNAMIX Torsten Uhlmann <T.Uhlm...@agynamix.de>
> wrote:
> > Thanks heaps for your response, and thanks for the hint with the

randomly named CometActor per page.

> > Now, how do I sent a message to the CometActor associated with the page

the request came from?

> > We currently have something like this:

> > class NotificationsActor extends CometListener

> > That thing registers with a NotificationServer to whom I sent the

messages. How would I send the message to the Actor directly, do I just
keep a reference in a RequestVar?

randomly named comet actor per page is better so that you'll have a
different instance per page.

> > > I don't understand how CometListener works into the design.  Why not

just send the message directly from the Ajax handler to the CometActor
associated with the page that the Ajax request came from?

https://www.assembla.com/wiki/show/liftweb/Posting_example_code

> > > --
> > > Visi.Pro, Cloud Computing for the Rest of Ushttp://visi.pro
> > > Lift, the simply functional web frameworkhttp://liftweb.net
> > > Follow me:http://twitter.com/dpp
> > > Blog:http://goodstuff.im

> > > --
> > > 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

> --
> 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

 
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 »