users@glassfish.java.net

Re: Problem with Native deployment of ruby on rails application on glassfish v3

From: Vivek Pandey <Vivek.Pandey_at_Sun.COM>
Date: Tue, 05 Jan 2010 09:38:45 -0800

glassfish_at_javadesktop.org wrote:
> After native or directory deployment of my rails application on glassfish v3, I found it was incredibly slow: it took about 13 seconds to display a simple webpage,
>
>

I would expect this time to be in the same range as JRuby+Webrick or
JRuby+Mongrel. GlassFish v3 deployment does the following when you
deploy a Rails aplication

1. create JRuby runtime.
2. load Rails app using this Runtime.

I have seen that 1 typically takes roughly around 20% of the total
deployment time and rest is taken during Rails application processing by
JRuby.

> However, when I deploy the same application on Webrick, it only takes 0.6 second to display the same webpage.
You mean JRuby + WebRick? I think 0.6 sec would be for native/MRI Ruby
and Webrick. JRuby itself take few sec to comeup.

> By the way, when I use war deployment, the speed seems much faster.
>
>
In war case, only JRuby is booted and Rails application is not processed
during deployment. It gets processed when the first request is received.
So its question of where you want to spend the time. We thought its
better to spend all the time during deployment so that Rails app is
loaded and ready to serve the request. We can definitely support war
style split JRuby vs Rails loading, file and RFE and we will try to
address it.

> Is there any one has met the similar problem when selecting native or directory deployment of jruby app on glassfish v3? Why the deployment is so slow? it even drive my mad, help!!!!
>

Its really has nothing much to do with GlassFish v3 or directory vs war
deployment. The cost is really in JRuby runtime and the time it takes.
GlassFish v3 does the right thing by returning correct http status 503
with retry-after field so that the load balancers know what to do in
such cases.

-vivek.

> [Message sent by forum member 'hitwzh' (hitwzh_at_gmail.com)]
>
> http://forums.java.net/jive/thread.jspa?messageID=378809
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe_at_glassfish.dev.java.net
> For additional commands, e-mail: users-help_at_glassfish.dev.java.net
>
>