The Source for Java Technology Collaboration

Home » java.net Forums » GlassFish » GlassFish

Thread: Remote deployment of Rails app

Welcome, Guest Help
Login Login
Guest Settings Guest Settings
Reply to this Thread Reply to this Thread Search Forum Search Forum Back to Thread List Back to Thread List

Permlink Replies: 7 - Last Post: Nov 17, 2008 10:15 AM by: Vivek Pandey
Bill Kocik
Remote deployment of Rails app
Posted: Nov 15, 2008 11:30 AM
  Click to reply to this thread Reply


Is anyone doing deployment of Rails applications to remotely-running
GlassFish v3 servers? I'm thinking the simplest solution is probably
to use Capistrano for this, calling "asadmin" on the remote side to
deploy the app at the end instead of restarting mongrel clusters, but
I'm interested in other opinions or solutions.


--
Bill Kocik






---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@glassfish.dev.java.net
For additional commands, e-mail: users-help@glassfish.dev.java.net


Dick Davies
Re: Remote deployment of Rails app
Posted: Nov 16, 2008 12:22 AM   in response to: Bill Kocik
  Click to reply to this thread Reply

WARbler is probably worth a look for this kind of thing.

http://caldersphere.rubyforge.org/warbler/

On Sat, Nov 15, 2008 at 7:30 PM, Bill Kocik <bkocik@gmail.com> wrote:
>
> Is anyone doing deployment of Rails applications to remotely-running
> GlassFish v3 servers? I'm thinking the simplest solution is probably to use
> Capistrano for this, calling "asadmin" on the remote side to deploy the app
> at the end instead of restarting mongrel clusters, but I'm interested in
> other opinions or solutions.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@glassfish.dev.java.net
For additional commands, e-mail: users-help@glassfish.dev.java.net


Bill Kocik
Re: Remote deployment of Rails app
Posted: Nov 16, 2008 6:55 AM   in response to: Dick Davies
  Click to reply to this thread Reply


On 16 Nov, 2008, at 3:22 AM, Dick Davies wrote:

> WARbler is probably worth a look for this kind of thing.

That actually raises another question. I'm aware of Warbler (and
Goldspike, for that matter), and it's very cool - but I thought one of
the advantages of GlassFish v3 is that you no longer have to package
your app into a war file to deploy it.

The question is: Why is that an advantage? I've never been really sure
where to ask that question (though, in hindsight, I suppose this list
is it). I know how Warbler sets things up to run - with a dispatching
servlet - but what I don't know is how GlassFish does it when an app
is deployed natively. Is there really an advantage, or am I fooling
myself by avoiding packing my app into a war file for no real reason?

I know it's an advantage during development, because you get the same
change-file-and-refresh-browser dev cycle you get with WEBrick or
Mongrel. I don't know if there's an advantage to deploying to
production installs that way, though.

--
Bill Kocik






---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@glassfish.dev.java.net
For additional commands, e-mail: users-help@glassfish.dev.java.net


Vivek Pandey
Re: Remote deployment of Rails app
Posted: Nov 17, 2008 10:06 AM   in response to: Bill Kocik
  Click to reply to this thread Reply

Bill Kocik wrote:
>
> On 16 Nov, 2008, at 3:22 AM, Dick Davies wrote:
>
>> WARbler is probably worth a look for this kind of thing.
>
> That actually raises another question. I'm aware of Warbler (and
> Goldspike, for that matter), and it's very cool - but I thought one of
> the advantages of GlassFish v3 is that you no longer have to package
> your app into a war file to deploy it.
>
> The question is: Why is that an advantage? I've never been really sure
> where to ask that question (though, in hindsight, I suppose this list
> is it). I know how Warbler sets things up to run - with a dispatching
> servlet - but what I don't know is how GlassFish does it when an app
> is deployed natively. Is there really an advantage, or am I fooling
> myself by avoiding packing my app into a war file for no real reason?

When you deploy app natively, it does not go thru servlet (web container
layer). It simply couples grizzly's req/resp to Rails, which is faster.
Also, advantage during development.

>
> I know it's an advantage during development, because you get the same
> change-file-and-refresh-browser dev cycle you get with WEBrick or
> Mongrel. I don't know if there's an advantage to deploying to
> production installs that way, though.
>
GlassFish v3 supports native as well as warlber approach. Although I
would wonder why would you not use native deployment for production :-)

-vivek.

> --
> Bill Kocik
>
>
>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@glassfish.dev.java.net
> For additional commands, e-mail: users-help@glassfish.dev.java.net
>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@glassfish.dev.java.net
For additional commands, e-mail: users-help@glassfish.dev.java.net


Bill Kocik
Re: Remote deployment of Rails app
Posted: Nov 17, 2008 10:13 AM   in response to: Vivek Pandey
  Click to reply to this thread Reply


On 17 Nov, 2008, at 1:06 PM, Vivek Pandey wrote:

> GlassFish v3 supports native as well as warlber approach. Although I
> would wonder why would you not use native deployment for
> production :-)

Well, that was sort of my question. I'm looking for deployment
solutions (and I think I've settled on Capistrano), and someone
suggested using a war file, so I was asking about the differences.

Thanks for your answers about that.


--
Bill Kocik






---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@glassfish.dev.java.net
For additional commands, e-mail: users-help@glassfish.dev.java.net


Vivek Pandey
Re: Remote deployment of Rails app
Posted: Nov 17, 2008 10:03 AM   in response to: Bill Kocik
  Click to reply to this thread Reply

Firing off asadmin to deploy rails app remotely using capisitrano should
certainly work, although I have not tried that and would like to know
how it works. Although I am not sure why would you need mongrel cluster
with GlassFish v3.

Another option would be to use reverse proxy and have different
glassfish v3 servers running woth pre-configured JRuby runtime pool.

Glassfish v3 has JRuby runtime pool, which you can configure[1] to
handle concurrent requests. You would like to setup the jruby runtime
pool according to the available resources on your systems. Typically,
each jruby runtime for the app such as Depot, it takes around 20 MB, and
creating jruby runtime is little expensie in terms of time it takes to
compile the rails application. So you may like think about the startup
runtmes + the max and min.

Further you can also use apache/mod_jk or nginx etc. for reverse proxy
to different glassfish instances.

-vivek.

[1]http://wiki.glassfish.java.net/Wiki.jsp?page=ConfiguringJRubyRuntimePool

Bill Kocik wrote:
>
> Is anyone doing deployment of Rails applications to remotely-running
> GlassFish v3 servers? I'm thinking the simplest solution is probably
> to use Capistrano for this, calling "asadmin" on the remote side to
> deploy the app at the end instead of restarting mongrel clusters, but
> I'm interested in other opinions or solutions.
>
>
> --
> Bill Kocik
>
>
>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@glassfish.dev.java.net
> For additional commands, e-mail: users-help@glassfish.dev.java.net
>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@glassfish.dev.java.net
For additional commands, e-mail: users-help@glassfish.dev.java.net


Bill Kocik
Re: Remote deployment of Rails app
Posted: Nov 17, 2008 10:11 AM   in response to: Vivek Pandey
  Click to reply to this thread Reply


On 17 Nov, 2008, at 1:03 PM, Vivek Pandey wrote:

> Although I am not sure why would you need mongrel cluster with
> GlassFish v3.


I wouldn't. I think the statement that might have made you think I was
suggesting that is this one:

"I'm thinking the simplest solution is probably to use Capistrano for
this, calling "asadmin" on the remote side to deploy the app at the
end instead of restarting mongrel clusters"

What I meant by that was calling asadmin instead of restarting mongrel
clusters like you would do with a traditional Rails deployment to
Mongrel. In other words, deploying my Rails app to GlassFish v3 just
like Rails deployments are typically done, but at the point where
you'd typically restart your Mongrel clusters I'll run asadmin in its
place. :)

--
Bill Kocik






---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@glassfish.dev.java.net
For additional commands, e-mail: users-help@glassfish.dev.java.net


Vivek Pandey
Re: Remote deployment of Rails app
Posted: Nov 17, 2008 10:15 AM   in response to: Bill Kocik
  Click to reply to this thread Reply

Bill Kocik wrote:
>
> On 17 Nov, 2008, at 1:03 PM, Vivek Pandey wrote:
>
>> Although I am not sure why would you need mongrel cluster with
>> GlassFish v3.
>
>
> I wouldn't. I think the statement that might have made you think I was
> suggesting that is this one:
>
> "I'm thinking the simplest solution is probably to use Capistrano for
> this, calling "asadmin" on the remote side to deploy the app at the
> end instead of restarting mongrel clusters"
>
> What I meant by that was calling asadmin instead of restarting mongrel
> clusters like you would do with a traditional Rails deployment to
> Mongrel. In other words, deploying my Rails app to GlassFish v3 just
> like Rails deployments are typically done, but at the point where
> you'd typically restart your Mongrel clusters I'll run asadmin in its
> place. :)
>
Makes sense. Thanks for clarifying this.

-vivek.

> --
> Bill Kocik
>
>
>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@glassfish.dev.java.net
> For additional commands, e-mail: users-help@glassfish.dev.java.net
>


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@glassfish.dev.java.net
For additional commands, e-mail: users-help@glassfish.dev.java.net





 XML java.net RSS