I have two similar applications on heroku, is there a way I can make them share databases ? at least for User authentication ?
Right after I got answer to this question the following came to my mind: I will be using the multi app architecture for a long term / heavy network system:
1- First issue I will face is that the more processes I will have interacting with the shared resource, the more likely I will face scaling/performance and timing issues.
2- Complexity of the models, because at some point I'm planning to use rails engines, and I realized it will be a mess of data_model_prefixes.
3- Costy ? Monolithic apps on 1 db VS Many apps.
I found a few other solutions regarding this issue or let's say approach:
1- Letting every application have their own database, then maybe using an api to share the common tables between the applications.
2- If I decided to go to AWS, I can use Amazon RDS plugin that lets model being access from different databases uing ActiveRecord. sources:
https://stackoverflow.com/a/5986996/539075
https://stackoverflow.com/a/3479315/539075
and TaskRabbit explained some part of this very well:
http://tech.taskrabbit.com/blog/2014/02/11/rails-4-engines/
The ugly part is that I have angular on top of Rails, it's just hard to scale at some point!