Forum: JRuby best approach for multiple rails applications inside Tomcat?

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
Jin L. (Guest)
on 2009-01-26 22:17
(Received via mailing list)
HI all -

Today I am bringing up my second rails application inside the same
Tomcat installation. What is the best approach for this task? Since I
am using warbler, should I remove jruby-complete in each local war and
put the jruby-complete jar in common/lib? What about the jruby-rack
jar as well?

Thanks for your help -

Jin

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email
Nick S. (Guest)
on 2009-01-27 07:31
(Received via mailing list)
On Mon, Jan 26, 2009 at 2:16 PM, Jin L. <removed_email_address@domain.invalid> 
wrote:
> HI all -
>
> Today I am bringing up my second rails application inside the same
> Tomcat installation. What is the best approach for this task? Since I
> am using warbler, should I remove jruby-complete in each local war and
> put the jruby-complete jar in common/lib? What about the jruby-rack
> jar as well?
>
> Thanks for your help -

You can certainly take that approach if you don't like the idea of
multiple copies of the jars inside each war file -- it should work
fine as far as I know.

If memory is not a major concern, I wouldn't worry too much about the
duplication of 10-15MB per web application, however. You might find
that the flexibility of maintaining separate versions of JRuby and
JRuby-Rack per webapp could be an advantage.

/Nick

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email
Mwadhera M. (Guest)
on 2009-01-27 08:36
(Received via mailing list)
We (Involver.com) deploy multiple rack applications and package jruby
& rack in our app server's (GF) lib. Works well for us. Adds a little
more overhead when provisioning a new app server, but we prefer the
single copy of these core libraries loading only once at GF startup.
Also, I have no hard numbers on this, but I think app deploys are a
bit quicker with this technique as there is less moving parts in each
push.

On Mon, Jan 26, 2009 at 9:30 PM, Nick S. <removed_email_address@domain.invalid>
wrote:
>
>
> ---------------------------------------------------------------------
> To unsubscribe from this list, please visit:
>
>    http://xircles.codehaus.org/manage_email
>
>
>



--
Best,

Mike W.
http://metasaur.us

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email
Charles Oliver N. (Guest)
on 2009-01-27 17:28
(Received via mailing list)
Mike W. wrote:
> We (Involver.com) deploy multiple rack applications and package jruby
> & rack in our app server's (GF) lib. Works well for us. Adds a little
> more overhead when provisioning a new app server, but we prefer the
> single copy of these core libraries loading only once at GF startup.
> Also, I have no hard numbers on this, but I think app deploys are a
> bit quicker with this technique as there is less moving parts in each
> push.

That's probaby true; the extra copy of JRuby for every app does require
the server to load more stuff per app and the JVM to load and verify the
classes involved for each app. It also puts extra memory pressure on the
"perm gen" in Sun JDK. So if you know you're only ever going to use a
single JRuby version putting it in the app server's lib might work well.

We will continue to try to shrink the JRuby jar itself, of course.

- Charlie

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email
Jin L. (Guest)
on 2009-01-27 18:50
(Received via mailing list)
Just FYI - I went ahead and deployed with a jruby in each war, not for
any particular reason, just because it was the most convenient. There
is an increase in memory usage but the overhead is not bad at all.
Plus, like Nick said, I like having the ability to control which jruby
version is in each app, which might be useful in the future.

Thanks for your feedback all -

Jin

On Tue, Jan 27, 2009 at 7:28 AM, Charles Oliver N.
<removed_email_address@domain.invalid> wrote:
> That's probaby true; the extra copy of JRuby for every app does require the
> To unsubscribe from this list, please visit:
>
>   http://xircles.codehaus.org/manage_email
>
>
>

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email
Tommy M. McGuire (Guest)
on 2009-01-29 21:25
(Received via mailing list)
We've been using a separate jruby bundle with two applications
(currently, two
versions each of two applications) with the SpringSource dm server.  It
certainly made the 1.1.5 -> 1.1.6 upgrade a breeze.

Mike W. wrote:
> We (Involver.com) deploy multiple rack applications and package jruby
> & rack in our app server's (GF) lib. Works well for us. Adds a little
> more overhead when provisioning a new app server, but we prefer the
> single copy of these core libraries loading only once at GF startup.
> Also, I have no hard numbers on this, but I think app deploys are a
> bit quicker with this technique as there is less moving parts in each
> push.
>


--
Tommy M. McGuire
removed_email_address@domain.invalid

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email
This topic is locked and can not be replied to.