RoR web tier with Java middle / backend

I am looking for some tips / reviews on using different languages ​​in layered architecture. The architecture in question now represents the entire java stack (db, middle tier, and web tier), using Spring to bundle everything together. We gave up the idea of ​​using Ruby on Rails for the web tier, but I would like to know if anyone has done this before (possibly with different languages ​​/ technologies). The idea of ​​switching to RoR is to increase the development speed at the web level, however my initial analysis is that it will also reduce the development speed at the middle level.

Some of the questions I'm trying to get data for are the following:

  • Are there any small development teams that have used a hybrid language in a similar architecture?
  • Why did you use this approach? What worked well and what didn’t?
  • How would you deal with interfaces and models (perhaps use something like Google protocol buffers or Apache Thrift)?
  • Are there any other advantages or disadvantages of using this approach?
+4
source share
2 answers

While I have no experience with RoR, we have taken a similar approach with Django as an interface, where we will use java-based services to complete large-volume processing transactions.

We define a database in the django model, develop a web interface with a django / jquery view, and, obviously, we get a free admin site.

On the java side, we run the hibernate reverse engineering task to create DB access classes for Java code. Where necessary, we use the JSON engine created by JSON on top of AMQP RPC to communicate between python and java components.

There are ups and downs in this approach. For us, since we did not use any large java frameworks, we provided us with access to a quick / lightweight web interface for our solution, as well as the simplicity of modeling our database using the Django model format (which I really like).

At the bottom, we came across some tricky things with reverse engineering hibernation configuration (which is difficult if you are doing something that is not a standard of the swamp, especially regarding some of the Django ManyToMany relationships).

I noticed that you already mention that you already have a Spring based architecture with a web tier. I am not an expert here, but this may present you with opportunities worth exploring, for example, groovy / grails or SpringMVC, which in version 3 claim that they are significantly simplified and faster to develop. It can give you the victories you need.

A compromise might be to take a look at some RoR-inspired Java tools such as Rife .

The bottom line is that you will need to make a call in light of what your own application requirements and team capabilities are. This worked for us, and I think the solution is right for us, but if your team is already equipped with Java and Spring skills, then Spring 3 might be the way to go (but ask the Spring expert about this :-))

Rob

+2
source

This presentation will probably be of interest to you: Rails on Spring - Using JRuby as a Secret Sauce

+1
source

All Articles