Take the 2-minute tour ×
Programmers Stack Exchange is a question and answer site for professional programmers interested in conceptual questions about software development. It's 100% free.

The explanation

I was recently hired by a company that has an old RoR 2.3 application with more than 100k users, a strong SEO strategy with more than 170k indexed urls, native android and ios applications and other custom-made mobile and web applications that rely on a not so good API from the same RoR app.

They recently merged with a company from another country as an strategy to grow the business and the profit. They have almost the same stats, a similar strategy and mobile apps.

We have just decided that we need to merge the data from both companies and to start a new app from scratch since the RoR app is to old and heavily patched and the app from the other company was built with a custom PHP framework without any documentation.

The only good news is that both databases are in MySQL and have a similar structure.

The challenge

I need to build a new version that:

  • can handle a lot of traffic,
  • preserves the SEO strategies of both companies,
  • serve 2 different domains,
  • and have a strong API that can support legacy mobile apps from both companies and be ready for a new set of native apps.

I want to use RoR 3.2 for the main web apps and NodeJs with a Restful API. I know that I need to be very careful with the mobile apps and handle multiple versions of the API. I also think that I need to create a service that can handle a lot IO request since the apps is heavily used to create orders for restaurants at a certain time of the day.

The questions

With all this in mind:

  • What type of architecture do you recommend me to follow?
  • What gems or node packages do you think will work the best?
  • How do I build a new rails app and keep using the same database structure?
  • Should I use NodeJS to build an API or just build a new service with Ruby?

I know that I'm asking to much from you guys, but please help me by answering any topic that you can or by pointing me on the right direction.

All your comments and feedback will be extremely appreciated! Thanks!

share|improve this question

closed as off-topic by gbjbaanb, MichaelT, GlenH7, gnat, Kilian Foth Oct 31 '13 at 8:33

This question appears to be off-topic. The users who voted to close gave this specific reason:

  • "Questions about what language, technology, or project one should take up next are off topic on Programmers, as they can only attract subjective opinions for answers. There are too many individual factors behind the question to create answers that will have lasting value. You may be able to get help in The Whiteboard, our chat room." – gbjbaanb, MichaelT, gnat
If this question can be reworded to fit the rules in the help center, please edit the question.

1 Answer 1

You're going to have to first document that old PHP app, and your RoR app if you want to rewrite them. Unless you have a good, firm set of requirements that are very well defined (which would practically be documentation) then there's no way to do this without knowing what you are replacing - ie what you are going to create that acts exactly the same way.

After that, you'll probably have a better idea what to do based on the strengths of both apps, chances are you'll restructure parts of the existing apps and integrate the other into the first. Rewrites are like a pied piper leading all the bugs that used to be in the old apps to your door. Its isn't the easy or fun option you might think it is.

share|improve this answer
Hi @gbbaanb, we are going to throw away the PHP version and add a couple of features to the new RoR version. I'm not to worried about that since the apps are almost the same in terms of features and i do have a features list. The main concern is how to procede in terms of the new architecture and the never ending fight between using Node or Rails to accomplish the goal. –  javiayala Oct 29 '13 at 22:47
Node or Rails == Apples and Oranges. –  Robert Harvey Oct 29 '13 at 22:52
That's exactly why I asked @RobertHarvey. A couple of guys are saying that I should use NodeJs. What I really want to have is an app that can handle a lot of connections and it seems that building an API with Nodejs might solve this. Is this going to work if I stick with mysql or should I also change that? What do you think? –  javiayala Oct 29 '13 at 23:19
@javiayala It's impossible to answer your Node vs Ruby question. We have way too little knowledge about the details. However I'm sure both can handle large amounts of requests when implemented correctly. Node will probably be the safer choice. But why not prototype it if you are unsure? Make a mock or prototype and benchmark it. That's how I would do it. With networking a lot of the speed comes from proper network layer implementation and multiplexing. How many requests per second, how many DB lookups, where are the bottlenecks going to be? Only you and testing can answer those things. –  Casper Oct 30 '13 at 2:32
Thanks for the tip @Casper. I tried to explain my case the best I could and I understand why you say that. I'm probably going to do what you said, prototype and benchmark, and ask any other more specific question as they keep pop out. Thanks sir. –  javiayala Oct 30 '13 at 5:53

Not the answer you're looking for? Browse other questions tagged or ask your own question.