We’ve built a webapp using plain Coldfusion 9 (serving html content) and Java (backend work and connecting to WebServices). We’re expecting about 50 000 visitors a day, up to 200 requests per minute. Production servers are running on Windows.
The problem is that we’re getting tired and angry because of painful CF code.
Our idea is to replace the CF layer with Ruby on Rails. The java side should be left untouched, because it’s well written, reliable, fast and covered with automated tests.
So my question is: how would you approach this problem in details?
- Is JRuby the only option?
- Will invoking our jar-packaged Java code be still fast enough?
- Is Linux required along with switching to Rails? (I don’t like Rails on Windows)
- What about scalability? Do you recommend Sinatra to handle our traffic?
- Will it be possible to place this configuration in a cloud?
Thanks in advance
Don’t speak in absolutes! 🙂 JRuby has the benefit of being able to call Java libraries like CF, but it’s still an emerging platform, albeit one with great potential on the JVM.
If you are still going to run on a JVM language like CF or JRuby then I would say yes.
Linux is not required for JRuby (see here) – remember JRuby is just another JVM language and the benefit of the JVM is platform independence. If you are going for plain Rails I would recommend going over to Linux – I’ve tried using Rails on Windows before and it’s not pretty. Everything you read in terms of Rails tutorials etc. will assume a favour of Linux.
Sinatra is a very slimmed down framework which essentially uses simple regex routing rules. I would use it for small projects, but for a production application that is likely to grow, then no. You are better off getting the organisational benefits of Rails.
I believe Engine Yard do JRuby hosting. Heroku do Rails PaaS hosting. Heroku might not be a good match if you are using JRuby or calling Java from JRuby, but for a plain Rails application it’s very cool.
And as others have pointed out – CF is not the problem, the problem is how your application was written and organised. You can write crap Rails code too, remember.
Hoep all that helps you somewhat with your decision.