Hello, I''d like to start a process on the server and update the client with information about the process, such as ''starting application ...'' (wait 20 seconds) ''done'' and so on. Which strategy should I use? I have tried to use multiple render :update do |page| ... end, but this is not allowed (OK, obviously). And somthing like: page.insert_html :bottom, ''textarea'', ''before sleep'' sleep(20) page.insert_html :bottom, ''textarea'', ''after sleep'' did not work because both messages are sent back at the same time(?). So what could I do to update the browser''s text? I know of periodically_call_remote, but that way I''d have to remember the state on the server side, right? Patrick -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Patrick Gundlach wrote:> Hello, > > I''d like to start a process on the server and update the client with > information about the process, such as > > ''starting application ...'' (wait 20 seconds) ''done'' > > and so on. Which strategy should I use? I have tried to use multiple > render :update do |page| ... end, but this is not allowed (OK, > obviously). And somthing like: > > page.insert_html :bottom, ''textarea'', ''before sleep'' > sleep(20) > page.insert_html :bottom, ''textarea'', ''after sleep'' > > did not work because both messages are sent back at the same time(?). So > what could I do to update the browser''s text? I know of > periodically_call_remote, but that way I''d have to remember the state on > the server side, right? > > PatrickThe periodicalUpdater from the prototype js library might be what you want. See http://www.prototypejs.org/api/ajax/periodicalUpdater and http://api.rubyonrails.org/classes/ActionView/Helpers/PrototypeHelper.html#M000959 -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Hello,> The periodicalUpdater from the prototype js library might be what you > want. > See http://www.prototypejs.org/api/ajax/periodicalUpdater and > http://api.rubyonrails.org/classes/ActionView/Helpers/PrototypeHelper.html#M000959But then I''d have to remember the state of that client on the server, right? I mean: all the output generated between two periodical Updater requests has to be saved and then sent to the client. This is something I''d like to avoid if it is possible. Patrick -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
backgroundrb? not sure On Sun, May 4, 2008 at 10:08 AM, Patrick Gundlach <rails-mailing-list-ARtvInVfO7ksV2N9l4h3zg@public.gmane.org> wrote:> > Hello, > > > > The periodicalUpdater from the prototype js library might be what you > > want. > > See http://www.prototypejs.org/api/ajax/periodicalUpdater and > > http://api.rubyonrails.org/classes/ActionView/Helpers/PrototypeHelper.html#M000959 > > But then I''d have to remember the state of that client on the server, > right? I mean: all the output generated between two periodical Updater > requests has to be saved and then sent to the client. This is something > I''d like to avoid if it is possible. > > Patrick > > > > -- > Posted via http://www.ruby-forum.com/. > > > >--~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Roger Pack wrote:> backgroundrb? not sureThat''s a cool thing! Not really solving the problem I have here, but it will solve other problems! Thanks, Patrick -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Patrick Gundlach wrote:> Roger Pack wrote: >> backgroundrb? not sure > > That''s a cool thing! Not really solving the problem I have here, but it > will solve other problems! > > Thanks, > > PatrickI googled with the keyword "AJAX push" and it came with a few interesting results What about this: http://home.flowdev.de/wordpress/index.php (Look for RTRails) http://www.lightstreamer.com/ http://www.pushlets.com/ -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Danny Hiemstra wrote:> Patrick Gundlach wrote: >> Roger Pack wrote: >>> backgroundrb? not sure >> >> That''s a cool thing! Not really solving the problem I have here, but it >> will solve other problems! >> >> Thanks, >> >> Patrick > > I googled with the keyword "AJAX push" and it came with a few > interesting results > What about this: > http://home.flowdev.de/wordpress/index.php (Look for RTRails) > http://www.lightstreamer.com/ > http://www.pushlets.com/Hello Danny, thanks for the keywords, somehow these didn''t come into my mind. I have not implemented anything yet, but this will guide me in the right direction. Thans again! Patrick -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
You might want to check out the juggernaut gem and associated plugin. In short, it sticks a little flash app into your page which ultimately allows you to _push_ from the webserver to the client browser. There are various options for identifying clients and channels so the messages you push can be as broad or restricted as you like. Typically you end up pushing javascript to the client to update the state of the page. On May 5, 3:10 pm, Patrick Gundlach <rails-mailing-l...-ARtvInVfO7ksV2N9l4h3zg@public.gmane.org> wrote:> Danny Hiemstra wrote: > > Patrick Gundlach wrote: > >> Roger Pack wrote: > >>> backgroundrb? not sure > > >> That''s a cool thing! Not really solving the problem I have here, but it > >> will solve other problems! > > >> Thanks, > > >> Patrick > > > I googled with the keyword "AJAX push" and it came with a few > > interesting results > > What about this: > >http://home.flowdev.de/wordpress/index.php(Look for RTRails) > >http://www.lightstreamer.com/ > >http://www.pushlets.com/ > > Hello Danny, > > thanks for the keywords, somehow these didn''t come into my mind. I have > not implemented anything yet, but this will guide me in the right > direction. Thans again! > > Patrick > -- > Posted viahttp://www.ruby-forum.com/.--~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---