hasan's blog (বল্গ)

work for fun!!!

Archive for September 2007

configure rails in production environment.

with one comment

for last couple of days, i was struggle with rails deployment related issue, so far i was happy with mongrel backed and apache reverse proxy front configuration.

so last night, i found mongrel is surprisingly slow for serving static content, like javascripts, images, and styles files. so later i set apache for serving static files. now it seems out performing ;)

anyway, i was wondering about mongrel and how does it works in production deployment. as we know (who use java backed application server in production environment), any java backed application container are configurable. where we can define the maximum limit of thread pool size.
but i didn’t find this type of thing over mongrel, later few of the following urls, really helped me to understand how mongrel  works in production environment. the concept is very simple.

every mongrel worker is a standalone instance of mongrel and every mongrel instances are listening to a specific port. so i have to setup a reverse proxy or a load balancer which will be used to pick up the right mongrel instance.  for all session affinity shake, there must be some solutions, this is what i have to figure out later. (hopefully after getting my laptop)
here are the resource links -

pound – used as load balancer and reverse proxy service.

jared’s guide how to install pound

Grails vs rails fight, though it doesn’t worth rather than few configuration learning.

hope these will be helpful for my future reminding :)

Written by nhm tanveer hossain khan

September 9, 2007 at 8:55 am

Posted in Ruby, deployment, server

Just bang, a new group, Rails artist, Only Ruby on Rails Artist here

leave a comment »

these message convey the basic purpose of the rails_artist group-

Those who belief on themselves, those who believes they are passionate about the rails stuff in ruby way on rails, i belief this gonna create a new open space for them to share their nut and bolts.

from now on let’s change your title from developer, software engineer or architect to an ARTIST :)

welcome, dear artist.

here is the group url -

http://tech.groups.yahoo.com/group/rails_artist/ 

Written by nhm tanveer hossain khan

September 5, 2007 at 8:06 am

Posted in Introduction, Ruby

ruby: user friendly url, slug

leave a comment »

i had a requirement to create user friendly url, like the following example -

www.domain.com/user-friendly-url,

so you know i am getting more and more passion over ruby stuff, http://blood.we4tech.com just brought me on rails again.

here is the ruby code snap, which removes all kinda illegal characters and  creates a nice slug -

title.gsub(/[^[:alnum:]]+/i, “_”)

thanks  push.cx for quick nice example

best wishes,

Written by nhm tanveer hossain khan

September 5, 2007 at 7:47 am

Posted in Ruby

IntelliJ IDEA and ruby plugin

leave a comment »

i belief, i should share this story, once i heard about apatana (eclipse based) ruby IDE i gave it a try without being late, later i heard Net beans got ruby supported, again i wasn’t late and gave it a try.

as you know, i am java developer, always like java stuff everywhere (if possible). anyway, later i returned to my favorite IDE IntelliJ idea.

my personal judgement in terms of usable and flexibility i must say, intelliJ idea with ruby plugin just rocks!!
currently i am developing a active record kind of things where i am using java based repository model in back end and my restful web service clients are developed on ruby.

i am pleased with intelliJ idea, as because the ruby plugin is too friendly, though i faced lot of internal code hints related problem, but i could see those problems were fixed on new release.

here is the ruby plugin details page

Written by nhm tanveer hossain khan

September 1, 2007 at 11:12 pm

Posted in Introduction, Java, Ruby