Some frustration with JRuby + Rails on Google AppEngine
A few engineers at Google and other developers are doing some good work towards getting Rails running on AppEngine both robustly and in a way that provides a good local development environment. One problem is simply that if your web app is not active, initializing JRuby + Rails + and all required gems can time out (30 second window for handling requests).
The Java and Python support for AppEngine is fantastic, but for two projects I want to do (my own projects, but may be revenue generating :-) I want a more agile programming language that Java and while my Python skills are sort-of OK, my knowledge of Django is very light.
I should probably just bite the bullet and spin up on Django, but I would strongly prefer working in Ruby. I have been experimenting with the JRuby + Sinatra + ERB + datamapper combination and at least an inactive web application spins up well within the 30 second request timeout window. I very much like datamapper (object identity issues) and it should not be too difficult to be completely portable on two platforms (given data import/export utilities):
For future projects if I need lots of back end processing (map reduce, spidering sites, etc.) then I will stick with Amazon EC2. If I can get by with just a web interface and a data store, then I would prefer AppEngine (to save a little money). Two great platforms!
The Java and Python support for AppEngine is fantastic, but for two projects I want to do (my own projects, but may be revenue generating :-) I want a more agile programming language that Java and while my Python skills are sort-of OK, my knowledge of Django is very light.
I should probably just bite the bullet and spin up on Django, but I would strongly prefer working in Ruby. I have been experimenting with the JRuby + Sinatra + ERB + datamapper combination and at least an inactive web application spins up well within the 30 second request timeout window. I very much like datamapper (object identity issues) and it should not be too difficult to be completely portable on two platforms (given data import/export utilities):
- JRuby + AppEngine
- Ruby (1.8.x or 1.9.x) on any server
For future projects if I need lots of back end processing (map reduce, spidering sites, etc.) then I will stick with Amazon EC2. If I can get by with just a web interface and a data store, then I would prefer AppEngine (to save a little money). Two great platforms!
It's also worth noting that there's a lot of work going on to speed up GAE/J that look like they'll get JRoR init times well under 30s. After that, improvements to RubyGems and JRuby can get it to a reasonable speed. It is definitely being addressed.
ReplyDeleteHello Jay: that is good to know, thanks. I actually had a 30 second startup problem with a Java web app because it had to do some data initialization - I had to work around that.
ReplyDeleteHello Charles: long term, I am not worried about good JRoR support on AppEngine: I am sure that will happen. For now, JRuby + Sinatra + ERB + DataMapper is working well for me.
Best regards,
Mark
Merb + Sinatra + Data Mapper + eveny Pony (for email) are fine.
ReplyDeleteBut the need to install and compile 1 to 2 to 3 dozens of things, is a show-stopper for BOTH dabblers and old floks, or enterprisy guys like us.
Let's cheer the gurus who are developing the code/plygins/bundlersetc for us.
George: I wrote this blog post a couple of months ago, but the situation for me is the same: no problems using Sinatra + Datamaper on AppEngine, but Rails still does not work well for me. That said both the ApEngine and JRuby teams are making continuous improvements - patience is good :-)
ReplyDelete