Peter Cooper : UK Web 2.0 and Ruby on Rails consultant
Recent Posts
»Jay-Z: From Brooklyn to the Boardroom
»Prank Caller Submits Girl To Sexual Torture By Proxy
>Full archive
Other Posts
« Online quiz shows from the late '90sEmbedded live chat »

AJAX powered chat in 3 hours on Ruby on Rails


I thought I'd have a noodle around and came up with a quick and simple Web chatroom in a few hours. It seems to work okay, but I've only tested on FireFox and Safari. On IE it's bound to look totally out of wack as I'm not sure it supports position: fixed, which I used for the IRC-esque layout. Anyway.. whoever's reading this, please drop by at http://www.bigbold.com/congress/ to help give this a whirl! I'll be hovering on it, so come on and say something to me :)

(Added: Very basic source code.)




December 16, 2005 | Posted by peter | Comments (15)
Comments

I'm curious as to how you are storing the chat text.
Sql? TextFile? Something else? I'm very interested in developing my own version of this, using ror. Will you be sharing any source code? Email me if possible.

-Jordan (blissdev)

Posted by: Jordan Arentsen at December 19, 2005 05:17 AM

Is this available for use or not?

I figure why reinvent the wheel when someone has already been there done that?

Posted by: Alison Yates at December 19, 2005 07:56 AM

I've heard this point several times now. Why reinvent the wheel?

Why are there hundreds of types of car out there? Why keep making different models? If I didn't reinvent the wheel, I'd never have anything to do and be out of work.. nearly everything everyone does in their job is doing something someone else has done already! Unless you're scaling some unknown mountain, I guess..

Secondly, I just Googled for 'ruby on rails ajax chat'.. this page is number one. I guess I'm hardly reinventing anything. There's another RoR AJAX chat mentioned called Realtime On Rails, but the URL is broken! Excellent. So I guess we're not drowning in hundreds of RoR chat implementations, right?

Also, this is open source. You can get it from public SVN. Address coming soon. Early visitors to the chat room have it, but I didn't publish it again yet.

Posted by: Peter Cooper at December 19, 2005 12:39 PM

what sort of storage are you using?

Posted by: Jordan at December 19, 2005 07:16 PM

Database.

It wasn't initially written to be a chat room, but to be a system for developing certain sorts of games, such as team word games, which work well on a channel/message system at the backend. As it came together though, I thought I'd see if it could stand the strain of regular chat.

Posted by: Peter Cooper at December 19, 2005 07:25 PM

I'm building my own, but even though I use form_remote_tag it isn't updating asynchronously. Hopefully I'll figure it out.

Posted by: Jordan Arentsen at December 19, 2005 07:34 PM

It won't update ajax style. Could you give me any hints on the app code at http://blissdev.com/temp/
?

THanks,
blissdev

Posted by: Jordan Arentsen at December 19, 2005 07:51 PM

You need periodically_call_remote :) Call that every X seconds, and make sure your app sends back the latest lines to add.

Posted by: Peter Cooper at December 19, 2005 09:05 PM

I figure that I could go do it myself but isn't it better that less is more in many circumstances ... this concept included.

So I'm off to do it myself and create yet another wheel.

Posted by: Alison Yates at December 19, 2005 09:19 PM

I think I misread your post. I thought you were asking me why I'd reinvented the wheel, rather than why should you ;-) So accept my apologies for that.

In any case, you can check out at:

svn://server.feedfab.com:7900/congress/trunk

Posted by: Peter Cooper at December 19, 2005 09:26 PM

Thanks for the link, I hope to use it.

Posted by: Alex Piner at December 19, 2005 09:43 PM

Thanks for contributing to the community of knowledge.

Posted by: Jordan Arentsen at December 21, 2005 07:13 AM

the svn says i need a username and pwd.

Posted by: Jordan Arentsen at December 21, 2005 07:43 AM

it says i need a username and password

Posted by: Jordan Arentsen at December 21, 2005 07:43 AM

oospie, scratch those 2 previous comment.s

Posted by: JA at December 21, 2005 07:45 AM

Return to the homepage.
Privacy Policy