I'm wondering if somebody has some insight about this problem.

Just a little background:

We have used Rails emigrate from a classic dBase and Visual Fundamental based system to construct internal company IntrAnet that does such things as label printing, invetory control, shipping, etc - essentially an ERP

The Dilemma

At this time we have to replace a classic customer-facing website which was completed in Java, that would connect with our organs and circulatory system for the clients to make use of. You want to have the ability to pull information like inventory, order positioning, account claims from your organs and circulatory system and expose it to site live. This is because we take orders online, through fax &lifier phone and often we now have walk-inches. So sometimes (hardly ever thou) a short delay in inventory update on our old Java site makes us put a purchase on backorder, because we sell exactly the same item to two clients within 30 minutes. It's often fixed within eventually but you want to avoid this later on.

Actual Question

Does anybody have suggestion regarding how to make this happen inside a better way?

Listed here are three options which i see:

a) Develop a separate Rails application on the web server, which will connect with the same DB our internal application connects to.

  • +++ Advantages:Live data - same factor our internal applications see, i.e. orders are produced instantly, inventory runs out immediately

  • --- Disadvantages: Potential security risk, duplication of code - i.e. I have to duplicate all of the remotes, models, sights, etc. that cope with orders.

b) Develop a separate Rails application on the web server, which will connect with another DB from your internal application.

  • +++ Advantages: Less security exposure.
  • --- Disadvantages:Extra effort to sync web DB and internal DB (or utilizing a web service like Relaxation-API), extra code to deal with inventory depletion and order # creation, duplication of code - i.e. I have to duplicate all of the remotes, models, sights, etc. that cope with orders.

c) Expose internal application towards the web

  • +++ Advantages: all of the problems previously mentioned removed. This really is much "DRY"er method.
  • --- Disadvantages: Much more security head aches. More difficult login systems Body for web &lifier one for internal customers using LDAP.

So any ideas? Anybody had similar problem to resolve? Please bear in mind our company has limited assets - namely one developer that's devoted for this. Which means this needs to be among individuals "right" and "wise" solutions, not "throw money/people/assets only at thatInch solutions.

Thanks.

I'd get a. You need to have the ability to produce the remotes to ensure that they're re-functional.

Internal customers are as prone to duplicate data as exterior customers.

The chances are a public UI as well as an internal, for-the-staff, UI will have to be different. The information must be consistent and so i would put a great deal of effort into making certain that there's exactly one, definitive database. So: one database two UIs?

Possess a "service" layer that both UIs may use. If the was Java I'd be pretty confident of having the help done rapidly. I question how easy it's in Ruby/Rails.

The very best outcome is your existing Customer Java UI could be modified to make use of the Rails service layer.

I'd most likely create separate remotes for that public site and employ ActiveResource to drag data of your stuff internal application. Have a look at

http://blog.rubybestpractices.com/posts/gregory/rails%5Fmodularity%5F1.html

http://api.rubyonrails.org/classes/ActiveResource/Base.html

Edit - fixed link and added api link