<snip> Specific requirements. - We''ve got a number of Java applications already running in servlet containers. Using JRuby within the container would mean we could make native calls into these applications...very much easing integration. - Reusing the container itself would allow us to install at our various client sides with minimal impact. - Number one benefit: the stateful nature of Java servlets...i.e., servlets maintain state between requests. It''s a very nice feature to have, and one that RoR can''t provide as easily. Thanks for your input. John </snip> John, Have you thought of - Exposing the java servlets that you need as a service in order to maintain that functionality and just running what you want to do in Rails as a separate app (no this would not help the state issue, I know) - Something along the lines of Trails (a project to make something similar to Rails in Java) - Groovy? -Joe __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com
On 4/27/05, Joe OBrien <joeobjo-/E1597aS9LQAvxtiuMwx3w@public.gmane.org> wrote:> <snip> > Specific requirements. > > - We''ve got a number of Java applications already > running in servlet > containers. Using JRuby within the container would > mean we could make > native calls into these applications...very much > easing integration. > - Reusing the container itself would allow us to > install at our various > client sides with minimal impact. > - Number one benefit: the stateful nature of Java > servlets...i.e., > servlets maintain state between requests. It''s a very > nice feature to > have, and one that RoR can''t provide as easily. > > Thanks for your input. > > John > </snip> > > John, > > Have you thought of > - Exposing the java servlets that you need as a > service in order to maintain that functionality and > just running what you want to do in Rails as a > separate app (no this would not help the state issue, > I know) > - Something along the lines of Trails (a project to > make something similar to Rails in Java) > - Groovy? > > -Joe > > > __________________________________________________ > Do You Yahoo!? > Tired of spam? Yahoo! Mail has the best spam protection around > http://mail.yahoo.com > _______________________________________________ > Rails mailing list > Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > http://lists.rubyonrails.org/mailman/listinfo/rails >I''d have to seriously question any potential benefits you might get by running ruby and/or rails inside of a j2ee app server. You would not get the benefits of transaction management, nor session management, nor connection pooling, nor anything else without a concerted effort (essentially rewriting a good amount of activerecord and actionpack) You probably lose the ability to use ruby libraries that have c extensions. I think the negative outweighs the positive. I''ll second Joe''s suggestion of groovy. Groovy basically is java, but with a lot of sugar to make it bend over backwards to do some nifty things you wouldn''t otherwise think it could do. And it already plays nice with a servlet container. If java is a requirement, it will be a much easier transition to groovy than trying to go directly to ruby. Jason
On 4/27/05, John Wells <jb-y8WhZ5XeQqVfbyii3fMa5/Z4XP/Yx64J@public.gmane.org> wrote:> Jason Foreman said: > > I''ll second Joe''s suggestion of groovy. Groovy basically is java, but > > with a lot of sugar to make it bend over backwards to do some nifty > > things you wouldn''t otherwise think it could do. And it already plays > > nice with a servlet container. If java is a requirement, it will be a > > much easier transition to groovy than trying to go directly to ruby. > > We''ve looked at Groovy, but it''s more or less incomplete. Jython is a > more viable option and currently runs just fine inside of a servlet > container. You still reap all the benefits of the container, because you > can make Python->Java calls into the container (see > http://seanmcgrath.blogspot.com/JythonWebAppTutorialPart1.html for an > example). > > However, as a development shop we''d prefer Ruby over Python, and we''ve > obviously very interested in Rails. If JRuby worked the same way (i.e. > Ruby->java calls) within the container, I think it could present some very > useful scenarios, particularly if you already have Java servlet-based > applications that you''d like to communicate transparently within the same > container from a RoR app. > > Joe''s suggestion of exposing the servlets as service apis is valid, as well. > > Thanks, > John > >That''s a decent article. It should be possible to construct a similar RbServlet that would do essentially the same thing as the PyServlet, but that only gets you Ruby, not Rails. You''d still have to rewrite the libraries to utilize the container. You can make calls to java objects in JRuby, so the tools exist to do what you want. I''m still skeptical of the ROI of making it work though. I''m in fact in almost the same position as you right now. I have a significant investment in Java code, both web and desktop. We''re now trying to move towards more dynamic languages while still leveraging our existing code. Right now the leader is jython, which seems to be a bit more mature than JRuby, and which spanks the pants off JRuby when using Swing. Though it does has the disadvantage of being 3 versions behind the latest Python (2.4 vs 2.1) I am going to research this some more, and if I find anything interesting I''ll share it. I''d like to get some insight into the ''behind the scenes'' of jython and jruby. Jason
Jason Foreman said:> I''ll second Joe''s suggestion of groovy. Groovy basically is java, but > with a lot of sugar to make it bend over backwards to do some nifty > things you wouldn''t otherwise think it could do. And it already plays > nice with a servlet container. If java is a requirement, it will be a > much easier transition to groovy than trying to go directly to ruby.We''ve looked at Groovy, but it''s more or less incomplete. Jython is a more viable option and currently runs just fine inside of a servlet container. You still reap all the benefits of the container, because you can make Python->Java calls into the container (see http://seanmcgrath.blogspot.com/JythonWebAppTutorialPart1.html for an example). However, as a development shop we''d prefer Ruby over Python, and we''ve obviously very interested in Rails. If JRuby worked the same way (i.e. Ruby->java calls) within the container, I think it could present some very useful scenarios, particularly if you already have Java servlet-based applications that you''d like to communicate transparently within the same container from a RoR app. Joe''s suggestion of exposing the servlets as service apis is valid, as well. Thanks, John