John Lam 1997 — 2026

Ruby in the real world

Sam Gentile was wondering about where Ruby is used in the ‘real world’, and where I’ve personally used Ruby.

Sam, you can easily Google around to see where Ruby is being used in the real world. Check out the Rails web site for some pointers to some large web sites that are running on Rails.

As for where I’ve personally used Ruby and Rails, we wrote a lot of Ruby code for my last customer. The product hasn’t been announced yet, so I still can’t talk about it, but suffice to say that it’s a high performance e-commerce web service with two very large customers running on top of it (and many more to come).

We used Ruby to automate deploying the web service to our cluster. Ruby’s integration with COM made writing the ADSI + WMI goo much more pleasant. I even toyed with rewriting the core web service (which is a .NET web service) in Ruby and was able to exploit an optimization that simply was not possible using .NET and SQL Server. There was an intermediate result set that could easily be cached in-memory using Ruby that wuold net us at least a 10X performance increase over the existing .NET application.

To be fair, I could have done the same optimization using C#, but there would be no way that I could squeeze it down into 200 lines of very concise Ruby code. The other qualitative difference is that the caching optimization was just really obvious in the Ruby code; there was just so few lines of code to look at.

We also built out a Rails web site to support the API. Developers using the web service could run live queries against our catalog using the site. The web site would also generate the application code for them in their programming language of choice: C#, VB.NET, Java or raw SOAP calls. It’s very similar in spirit to the AWS Zone site (even though I’m convinced that we have a much simpler query API than Amazon does).

I’m convinced that Ruby and meta-programming is a great way to approach modeling business applications. That’s why I’m investing so much time building my Ruby to CLR bridge.

7 archived reader comments

Matt (2006-01-05)

What I’m waiting for is banks to start writing trading systems in Ruby :)

Sam Gentile (2006-01-05)

Thanks for responding John. I am not interested in searching Google for Ruby on Rails for just web sites. Thats easy stuff as CGI and C could be used. Web sites are trivial.

I am more interested in “real world” apps like the one you mentioned for your customer. Thats what my question was about.

John Lam (2006-01-06)

I wouldn’t go so far as to claim that web sites are trivial. I personally feel that web applications are among the most complicated applications that developers have to tackle.

And besides, why all the buzz about Rails if you could just as easily use CGI and C? Are all of those Java developers smoking crack?

Sorin (2006-01-06)

Interesting: http://www.oreillynet.com/ruby/

John Lam (2006-01-06)

Thanks for the great RSS pointer, Sorin. Subscribed.

Justin (2006-01-06)

Speaking of the .NET-CLR bridge, any updates available? I imagine you are busy with the new addition to the family so I’m not too hopeful - but I’m still excited about it!

In the future, could you provide a DLL with the download? I don’t have VS2005 and thus can’t compile the DLL for myself …

John Lam (2006-01-06)

I’ve been working on the bridge on and off all week. I have constructor overloading, method overloading, and indexer support baked in. Next up is wrapping up properties, fields and events. That should make for a usable release. If I have enough cycles - that should ship towards end of next week.