0

We have a live rails web app on Heroku. There's a group of students who want to work on making an improved version for us.

Rather than give them access to our live rails app & DB, I'd prefer to have them work on their own separate version, push changes to their app, and then just A/B test our users/traffic against their new app.

Basically I want to A/B test two completely separate apps with one shared DB. A user who views one version of the app should continue to see that version of the app moving forward.

What are my next steps?

Jackson Cunningham
  • 4,973
  • 3
  • 30
  • 80

2 Answers2

2
  • Create a new Heroku application
  • Add them as a collaborator
  • set the new apps DATABASE_URL to that in your original application

The problem will come with DNS (unless you're happy to give it a new URL like new.mydomain.com but also remembering which site to serve. You'd have to introduce a router above the two apps to remember and that's just going to get complicated.

John Beynon
  • 37,398
  • 8
  • 88
  • 97
  • Thanks, this works. I'll use something like app.mydomain.com and then add a before hook in application controller that redirects a certain percentage of signed in users. – Jackson Cunningham Feb 01 '16 at 18:55
  • Any ideas on how you would share session data with devise? Currently this setup is booting out logged in users when I move them from mydomain.com to app.mydomain.com – Jackson Cunningham Feb 01 '16 at 20:42
  • nvm found this: http://stackoverflow.com/questions/10402777/share-session-cookies-between-subdomains-in-rails – Jackson Cunningham Feb 01 '16 at 20:51
1
  • will need to share session data, if sessions storage is filesystem based, you will be change it to redis or memcache
  • consider using https://www.cloudflare.com to simplify DNS management
Marat Amerov
  • 406
  • 2
  • 9