How to convert long urls to short urls??

I have an application to bang my head for couple of days. It has to convert the long urls to be converted to short urls like the ones in rubyurl.com .

http://groups.google.com/group/rubyonrails-spinoffs/browse_frm/thread/ceb93da8e02b3253/#

tip: Google custom search engines

http://www.rorsearch.net/

http://vinsol.com/railssearch.html

google hurl. It's an open source tinyurl implementation in ruby (using camping framework)

www.hurl.it i think...