Rails & Heroku: Can I share database between two apps? -
i have 2 similar applications on heroku, there way can make them share databases ? @ least user authentication ?
right after got answer question following came mind: using multi app architecture long term / heavy network system:
1- first issue face more processes have interacting shared resource, more face scaling/performance , timing issues.
2- complexity of models, because @ point i'm planning use rails engines, , realized mess of data_model_prefixes.
3- costy ? monolithic apps on 1 db vs many apps.
i found few other solutions regarding issue or let's approach:
1- letting every application have own database, maybe using api share common tables between applications.
2- if decided go aws, can use amazon rds plugin lets model being access different databases uing activerecord. sources:
https://stackoverflow.com/a/5986996/539075
https://stackoverflow.com/a/3479315/539075
and taskrabbit explained part of well:
http://tech.taskrabbit.com/blog/2014/02/11/rails-4-engines/
the ugly part have angular on top of rails, it's hard scale @ point!
>heroku config | grep database
this give database url can use these variable values second app.
heroku config:set key1=value1 [key2=value2 ...]
these credentials can found heroku dashboard. tell me if works you.
Comments
Post a Comment