May 23, 2007 at 7:46 am
· Filed under Sites On Rails
This is might be the site with the highest traffic in the web that uses Ruby on Rails. Yellowpages.com lunched a new Beta site totally written in Ruby, both the service and the web application are written in RoR. We worked very hard to get it out, and you can check it here:
http://ngs.yellowpages.com/
Yellowpages.com receives millions of visits and page views every day. The current yellowpages.com is a J2EE application. The new RoR application will replaces the current one in the end of June.
It is hard to say who is the RoR site with largest traffic, it goes between twitter and yellowpages.com. I feel comfortable to say that we receives more traffic.
Permalink
May 19, 2007 at 7:12 pm
· Filed under Rails Hosting
I am currently looking to find good Ruby on Rails hosting. I tried two web hosting plans from two different companies, and I am not convinced. I like to run Mongrel on my server, and I really need high availability.
I found a huge list here, but it is hard to choose the perfect web hosting company. Most web site hosting companies are good at Php hosting. I can always find great php hosting, some of these hosting companies runs ruby on rails using light http server or using Fast CGI which seems sucks.
If you have recommendations about good hosting companies, please post a comment.
I appreciate the help.
Permalink
May 17, 2007 at 11:59 am
· Filed under Rails tips
Rails Render is a strong method that helps you to render your web pages. It comes with many flavors including:
1) Render action: render an action in the current controller, you can specify if you want layout printed or not
2) Render partial: renders part of your web page
3) Render template: render a page, the file path is relative to your application
4) Render file: absolute path is needed
5) Render text
6) Render Json
Permalink
May 16, 2007 at 5:04 pm
· Filed under Rails tips
This is how we issue 301 in Rails
Permalink
May 15, 2007 at 9:27 am
· Filed under Rails tips
Ajax Rails API Here. I really enjoy using this API, you need to type what class, module or method you are looking to and it will get it to you. Then you get the details and enjoy rails development.
Permalink
May 13, 2007 at 9:07 pm
· Filed under Sites On Rails
These are very interesting slides about scaling twitter:
http://www.slideshare.net/Blaine/scaling-twitter
Enjoy!
Permalink
May 13, 2007 at 8:10 pm
· Filed under Rails tips
I have done some research through the weekend about improving Rails Applications performance. I would feel the the following few points need to be considered when we optimize rails applications for performance:
1) Avoid the use of dynamic URL generation (link_to, url_for) since rails needs to look up the routes table and that may take time. Just hard code the controller name and the action.
2) Try to avoid the excess use of helpers since it adds overhead.
3) You may consider to use Rails Bench to do some testing for you rails application performance.
4) You may consider to use memcached to cache your model and library computation results.
5) you may consider partial caching for your view partials.
6) try to optimize your database queries. If you use ActiveRecord find, be careful from computation intensive sql queries that returns to you a lot of data that you may not need. The method find may run many select statements for you.
These are very few tips, I will write about Rails performance in more details soon.
Permalink
May 11, 2007 at 8:59 am
· Filed under Rails tips
This is how you issue 404 in Rails:
Permalink
May 10, 2007 at 2:04 pm
· Filed under Ruby Hash
This sample shows how to add element to ruby hash
Permalink
May 9, 2007 at 5:14 pm
· Filed under Ruby Numbers
How cute! Single line swap in Ruby. When I tried to do a single line swap in C, it was something like a^=b^=a^=b.
Permalink