Register a SA Forums Account here!
JOINING THE SA FORUMS WILL REMOVE THIS BIG AD, THE ANNOYING UNDERLINED ADS, AND STUPID INTERSTITIAL ADS!!!

You can: log in, read the tech support FAQ, or request your lost password. This dumb message (and those ads) will appear on every screen until you register! Get rid of this crap by registering your own SA Forums Account and joining roughly 150,000 Goons, for the one-time price of $9.95! We charge money because it costs us money per month for bills, and since we don't believe in showing ads to our users, we try to make the money back through forum registrations.
 
  • Post
  • Reply
nebby
Dec 21, 2000
resident mog
Rails is a great webapp framework ruined by a lovely O/R framework.

Adbot
ADBOT LOVES YOU

nebby
Dec 21, 2000
resident mog
You probably want to use :include to join in all the books when you fetch the author.

nebby
Dec 21, 2000
resident mog

Panic! at the Fist Jab posted:

Is anyone using edge Rails and the latest featureset that Rails provides consistently? I stopped using Rails about a year ago and focused on microframeworks like Sinatra, and I'm wondering if there's anything really amazing that I'm missing that the switch to Rails may be worth it again. Any awesome plugins, etc...
I have yet to bite the bullet, but running multithreaded Rails on JRuby is going to be a big win for us theoretically. (We're running JRuby now, but on Rails 2.1 with Ruby Runtime pooling.) Faster server restarts and dramatically reduced memory, since it does not have to cache the ASTs for all the gems N times.

nebby
Dec 21, 2000
resident mog

Ghotli posted:

We evaluated JRuby at work for a good while but eventually scrapped it. This was a while back and I assume JRuby has matured. Can you describe your deployement method with JRuby?
We're on glassfish, so it's pretty straightforward. We push the code with capistrano, and then use Warbler to package things up and do a glassfish deploy. We then restart glassfish round robin via capistrano, warming them up in sequence via curl and putting them back into nginx with a shell script.

Overall, my biggest complaint with JRuby is startup time -- it sucks. I've talked with the JRuby guys about ways to improve this but I don't think its very high on the priority list. The main problem is JRuby's parser and lexer is pretty slow, and so parsing and lexing all the gems at startup time takes a significant amount of work. Multithreaded Rails will reduce this burden on the server since it only has to do this once, instead of N times for each Ruby runtime, but on the client you still end up having to wait 20-30 seconds for a script/console :(

Other than that, JRuby is rock solid, we have been using it for a few months now and being able to integrate with Java code we already had has been a huge help.

nebby
Dec 21, 2000
resident mog

Ghotli posted:

I assume you're using glassfish v2 since v3 isn't stable yet. At work we have a few rails applications that we need deployed at the same time. When we were looking into glassfish I remember v2 not being able to host more than one rails app at a time. Do you have any idea if this is true or not?

We also had a whole lot of trouble getting warbler to work correctly. Obviously it's stable enough now for you to use in production. Do you have capistrano create the war file on the production server? If so could you show us the code for how you did that. Also, what is your rationale for warming up the production servers with curl. Is this so you can keep the rails environment in memory?
Yes, we are on v2. Warbler works ok, its a little slow. We do it on the servers via cap -- basically we do a few steps:

1) Stop domain
2) Warble
3) Start domain
4) Deploy
5) Stop domain
6) Start domain
7) Curl everything until the URLs come back instantly

We curl because basically glassfish has a ruby runtime pool (8 right now for us on EC2) and so there is a very large startup time penalty since JRuby has to lex, parse, and interpret all of the gems 8 times over (and stick the AST in RAM :( ). Curl'ing basically warms all these things up.

  • 1
  • 2
  • 3
  • 4
  • 5
  • Post
  • Reply