Rails and JRuby

Hello friends.

I’m investigating building a Rails stack with JRuby as the interpreter.
I’m
a little confused by the choice of Tomcat and Glassfish. Which is being
used
most frequently for greenfield set ups? Also, for Glassfish, are people
using Prelude, or version 2?

I also wouldn’t mind some hints with respect to how Capistrano or Vlad
fit
into the equation.

Our current stack uses MRI/Phusion/Apache.

Thank you for your time,

James H

On Fri, Jun 19, 2009 at 10:27 AM, James H.
[email protected]wrote:

Hello friends.

I’m investigating building a Rails stack with JRuby as the interpreter. I’m
a little confused by the choice of Tomcat and Glassfish. Which is being used
most frequently for greenfield set ups? Also, for Glassfish, are people
using Prelude, or version 2?

Either are decent choices. You should try both and see what fits your
environment better. Tomcat is smaller, Glassfish is probably a little
more
performant, but you should test with your apps. In either case, you’ll
probably be using Warbler to create the war files to deploy to them, so
you
can create one war file and deploy the same file in both to play around.

There’s also JRuby/Mongrel which is acceptable, and the Glassfish gem as
well.

I also wouldn’t mind some hints with respect to how Capistrano or Vlad fit
into the equation.

to have some good suggestions.

Cheers,
/Nick

I find the glassfish gem to be the most performant of all – and I don’t
need to war-up my app.

I proxy to the glassfish gem out of apache.

Capistrano is great, but not if you;re stuck with a Windows box

Date: Fri, 19 Jun 2009 11:12:55 -0500
From: [email protected]
To: [email protected]
Subject: Re: [jruby-user] Rails and JRuby

On Fri, Jun 19, 2009 at 10:27 AM, James H.
[email protected] wrote:

Hello friends.

I’m investigating building a Rails stack with JRuby as the interpreter.
I’m a little confused by the choice of Tomcat and Glassfish. Which is
being used most frequently for greenfield set ups? Also, for Glassfish,
are people using Prelude, or version 2?

Either are decent choices. You should try both and see what fits your
environment better. Tomcat is smaller, Glassfish is probably a little
more performant, but you should test with your apps. In either case,
you’ll probably be using Warbler to create the war files to deploy to
them, so you can create one war file and deploy the same file in both to
play around.

There’s also JRuby/Mongrel which is acceptable, and the Glassfish gem as
well.

I also wouldn’t mind some hints with respect to how Capistrano or Vlad
fit into the equation.

seems to have some good suggestions.

Cheers,
/Nick

Mistress Janna Brossard said:

I find the glassfish gem to be the most performant of all – and I don’t
need to war-up my app.

I proxy to the glassfish gem out of apache.

Ditto. I use glassfish3

I also have some mongrel cluster stuff, but glassfish is simpler and
just
works.


Best,
Marc

“Change requires small steps.”


To unsubscribe from this list, please visit:

http://xircles.codehaus.org/manage_email

Waring up the app is not a big issue. We use tomcat here, but for
deployment
only. Development mode we just run JRuby/mongrel.

I particularly didn’t go with glass fish - or any other app server for
that
matter - because we don’t need any of the extra services they provide.
e.g.:
EJB container.

Leonardo Borges

On Fri, Jun 19, 2009 at 7:13 PM, Mistress Janna Brossard <

James,

I simply put the following into my httpd.conf: (I am runninf Apache
1.3.33…I think you must have it set up to be able to do VirtualHosting
as well – which is set up if you have installed, say InstantRailis and
their examples):

<VirtualHost *>

ServerName gg.dyndns.org

DocumentRoot C:/jruby/rails_apps/gg/public/

ProxyPass / http://localhost:3000/

ProxyPassReverse / http://localhost:3000

Then fire up the LATEST Glassfish gem on, say, port 3000:

C:\jruby\rails_apps\gg>jruby -S glassfish

Voila…blazing speed, can handle lots of traffic. Note that I am also
cominging into apache from a dyndns name. So, whatever IP I have, I can
go straight to execution on the glassfish gem and NO warring up! What
could be easier deployment, or a faster execution? -Janna B

From: [email protected]
Date: Thu, 25 Jun 2009 09:17:10 -0400
To: [email protected]
Subject: Re: [jruby-user] Rails and JRuby

How does the proxying to Glassfish work? Doesn’t Glassfish have Grizzly
for handling incoming requests quickly?
James

On Fri, Jun 19, 2009 at 3:55 PM, marc [email protected] wrote:

Mistress Janna Brossard said:

I find the glassfish gem to be the most performant of all – and I don’t

need to war-up my app.

I proxy to the glassfish gem out of apache.

Ditto. I use glassfish3

I also have some mongrel cluster stuff, but glassfish is simpler and
just

works.

Best,

Marc

“Change requires small steps.”


To unsubscribe from this list, please visit:

http://xircles.codehaus.org/manage_email

How does the proxying to Glassfish work? Doesn’t Glassfish have Grizzly
for
handling incoming requests quickly?
James

I second Janna B.

I set this up on Solaris monday. It’s running fantasticly and
performing like nothing I’ve seen before :slight_smile: Completely stable memory,
no wirings or anything bad for 5 days now… (with several ab/htperf
stresstests).

In case you wonder how to integrate it with SMF, here’s the short, no
fluff version

[email protected]:~/ $ cat /etc/apache2/2.2/sites/ocr.smidig.no
<VirtualHost *:80>

ServerName ocr.smidig2009.no
DocumentRoot /var/apps/smidig2009/oc/smidig2009/public

<Directory /var/apps/smidig2009/oc/smidig2009/public>
Options FollowSymLinks
AllowOverride All
Order allow,deny
Allow from all

<Proxy balancer://smidig2009>
BalancerMember http://10.214.206.200:3000
BalancerMember http://10.214.206.201:3000

ProxyPass / balancer://smidig2009/
CustomLog /var/log/apache2/smidig2009_oc_apache_access_log combined

$ cat config/glassfish.yml
environment: oc
http:
port: 3000
contextroot: /

log:
# Logging level. Log level 0 to 7. 0:OFF, 1:SEVERE, 2:WARNING,
# 3:INFO (default), 4:FINE, 5:FINER, 6:FINEST, 7:ALL.
log-level: 5

jruby-runtime-pool:

initial: 1
min: 1
max: 1

daemon:
enable: true
pid: tmp/pids/glassfish-oc.pid
jvm-options: -server -Xmx2500m -Xms64m -XX:PermSize=256m
-XX:MaxPermSize=256m -XX:NewRatio=2 -XX:+DisableExplicitGC
-Dhk2.file.directory.changeIntervalTimer=6000

$ cat config/glassfish-gem.smf.xml

<?xml version='1.0'?>

<service_bundle type=‘manifest’ name=‘glassfish-gem’>


<service_fmri value=‘svc:/system/filesystem/local’/>


<service_fmri value=‘svc:/network/loopback’/>


<service_fmri value=‘svc:/milestone/multi-user’/>

<exec_method name=‘start’ type=‘method’
exec=‘/opt/jruby/bin/glassfish’ timeout_seconds=‘60’ />
<exec_method name=‘stop’ type=‘method’ exec=‘:kill’
timeout_seconds=‘60’ />


<method_context
working_directory=‘/var/apps/smidig2009/oc/smidig2009’>
<method_credential user=‘smidig_no’
group=‘daemon’ />
<method_environment>

</method_environment>
</method_context>


<method_context
working_directory=‘/var/apps/smidig2009/production/smidig2009’>
<method_credential user=‘smidig_no’
group=‘daemon’ />
<method_environment>

</method_environment>
</method_context>


</service_bundle>

$ pfexec svccfg validate config/glassfish-gem.smf.xml
$ pfexec svccfg import config/glassfish-gem.smf.xml
$ pfexec svcadm enable glassfish-gem:smidig2009_oc
$ pfexec svcadm restart apache22

oc

On Thu, Jun 25, 2009 at 4:47 PM, Mistress Janna
Brossard[email protected] wrote:

ProxyPass / http://localhost:3000/

easier deployment, or a faster execution? -Janna B
How does the proxying to Glassfish work? Doesn’t Glassfish have Grizzly for

I proxy to the glassfish gem out of apache.
“Change requires small steps.”


Windows Live™: Keep your life in sync. Check it out.


To unsubscribe from this list, please visit:

http://xircles.codehaus.org/manage_email