I''m creating a chat room in rails. I was wondering what people think is the simplest technique to achieve it? What success/experience have other people had? Any optimisation techniques would be useful to know. Thanks Chris -- 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 -~----------~----~----~----~------~----~------~--~---
chris-OIzkuoyqg0kAvxtiuMwx3w@public.gmane.org
2006-Aug-26 11:05 UTC
Re: Simplest technique for creating Chat Rooms
Chris wrote:> I''m creating a chat room in rails. > > I was wondering what people think is the simplest technique to achieve > it? > What success/experience have other people had? Any optimisation > techniques would be useful to know.Are you talking about a real-time chat room like Campfire? I think that basically works by using some Javascript to poll the server every few seconds to see if there are any new messages. I also vaguely remember something about them writing a special lightweight handler on the server side to respond to these messages without too much Rails overhead. Chris --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
If you''re looking for a non-polling solution, maybe investigate these: http://lingr.com/ http://juggernaut.rubyforge.org/ Also there are plenty of established Java/applet solutions that can be integrated - they might be a more surefire solution at this stage.> > Chris wrote: >> I''m creating a chat room in rails. >> >> I was wondering what people think is the simplest technique to >> achieve >> it? >> What success/experience have other people had? Any optimisation >> techniques would be useful to know. > > Are you talking about a real-time chat room like Campfire? I think > that > basically works by using some Javascript to poll the server every few > seconds to see if there are any new messages. I also vaguely remember > something about them writing a special lightweight handler on the > server side to respond to these messages without too much Rails > overhead. > > Chris > > > >--~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
I could imagine you could save overhead by sharing sessions between different users. You could store the chatroom in the shared session, with the last time it was updated, and if it was updated within the last few seconds then don''t update it, just use it, otherwise update the chatroom and place it back in the shared session. How does that sound -- 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 -~----------~----~----~----~------~----~------~--~---
Chris wrote:> I''m creating a chat room in rails. > > I was wondering what people think is the simplest technique to achieve > it? > What success/experience have other people had? Any optimisation > techniques would be useful to know. > > Thanks > ChrisHave you looked at Peter Cooper''s chat app "Congress". Maybe it will give some ideas. Here is the link to its source. http://www.petercooper.co.uk/media/congress1a.tar.gz -- 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 -~----------~----~----~----~------~----~------~--~---