Rails micro-services and authentication domain to use with devise
Hi!
I'd like to split my rails application to microservices, such as
- main app 1
- main app 2
- main app N
- authentication and account management
- administration console
- marketing console (blazer & ahoy)
- etc
As a reference - Spotify, Google, etc. All of them have a separate domain for authentication, so I'd like to ask you about best practices on how to organize application architecture
1 - how to navigate users from main apps, admin and marketing console to the authentication domain using devise? Should I use doorkeeper or ruby-cas or is there a better solution?
2 - should I store all data in one database and use database prefixes for main-app's (something like main_app1_comments or main_app_3_likes) or is it better to store data in separate databases?
3 - should I store users on in main database (which will contain authentication data, roles, stats, etc) or should i store users in their own databases and just replicate data from main database?
Any ideas?