0

My client wishes to launch a specific version of the Rails platform I am developing that will be restricted to a particular group of users (some sort of test-of-concept). I will have another server instance at a different url (regional.mydomain.com), in parallel to the main instance of the server (www.mydomain.com)

Now, this should only last for a couple months, and after that time this regional website/database should be merged into the main one.

I am wondering how to proceed with this, I am pretty sure this is a common practice though (if there's a specific name/concept for it please tell me so I can find information about it more easily and edit my question/tags)

I was just thinking of preparing a special env/deploy configuration for this regional URL, with a different MongoDB database, and after the test period ends, manually merge the regional DB into the main one.

If I go with this, Ideally I would want some sort of interactive merge where I can export the data little by little, and make sure there's no coherence problem (ie. not just a blunt append, but make sure the validations pass for every exported model, eg. that there is no duplicate document with values that should be unique for the collection/scope)

Do you have any experience on this or ideas how I could go about it ?

Another possibility I thought of was to keep the main database and add some sort of default scopes just for the regional platform, but I'd have to maintain several versions of the same code and this clearly doesn't seem like a good idea.

2
  • It really depends on the size of the database. If you are speaking about regional stuff i assume it's a big one. So you can't just manually merge the two db. You have to design a merge procedure, implement a merge procedure, test the merge procedure and finally run the merge procedure. "Do you have any experience on this or ideas how I could go about it ?" It could go very wrong because client's data loss is a very bad business. Commented Apr 20, 2016 at 9:33
  • The database shouldn't be that big. We use the word "regional" because we will test the app in a restricted area of our country (which happen to be called a "region"), but we're only talking about a few hundred users worth of data at most. Several hundred MBs at most I would say. Commented Apr 20, 2016 at 9:38

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Browse other questions tagged or ask your own question.