Jruby running inside of glassfish or jboss is an excellent option here.  
You can code the controllers, et al with RAILS and then use JMS to 
connect to backend processes.

Most containers have a command line api for setting up JMS queues, 
senders and receivers, etc. so you can use capistrano fore this and to 
deploying war files.  I might have an old cap file as an example if you 
need.

The pitfalls to watch out for are :

Often back-end services return results so you'll have to handle these 
with either a service bridge which handles the response and forwards to 
the Rails controllers via HTTP or stomp if using ActiveMq.

Another thing to be concerned about is the persistence layer.  If your 
controllers use the same data as the backend systems, there will be 
duplication of java jpa and ActiveRecord classes.

I tried to extend the use of Ruby to the JavaEE service side by having 
the Message Driven Beans invoke ruby scripts, but the problem is rails 
needs to start up on each invocation when you use ActiveRecord classes, 
so it makes the process too expensive.  I haven't experimented with a 
solution for this yet, but I'm sure there is a simple one.

-Brett


On 08/31/2009 07:08 AM, Scott Olmsted wrote:
>
> A software architect friend wrote me with a question I can't answer 
> because I don't do Java. I though I would see if any one has any 
> comments on his idea, or links to resources.
>
> Thanks,
>
> Scott
>
> He wrote:
>
> I'm thinking for the start-up that I will be working with of using an 
> architecture with Rails as the web site, but the back end consisting 
> of a cluster of various long-running services and integrations with 
> other financial institutions, to use java.  It seems that all of the 
> enterprise middleware is java-based, so if you want to do something in 
> that area, you kinda have to use java or at least something that 
> compiles down to java byte code.
>
> The motivation would be to try to take advantage of the productivity 
> gains of RAILS at least for those portions of the site.
>
> The Ruby front end would function as a client of the business servers 
> using REST or some other API; or it could use the java JMS API to 
> access the queuing middleware, if we use jRuby.
>
> Do you have any thoughts on this architecture?  Warnings?
> >

--~--~---------~--~----~------------~-------~--~----~
SD Ruby mailing list
[email protected]
http://groups.google.com/group/sdruby
-~----------~----~----~----~------~----~------~--~---

Reply via email to