We’ve been evaluating Frappe and really love the framework. We have however hit a wall in trying to figure out on our own and by referencing the documentation if it can support our need (Federated multidatabase setup for different apps with single signin).
We want to build a multiservice platform that has complementary services that ERPNext comes with. Of which we’ll be happy to merge with the core framework once we’re done for others to enjoy. Two use cases we’re thinking of is adding callcenter capabilities and bulk sms.
For scalability purposes, we would like to have the ability to configure the new apps (bulk sms and call center) to use different databases. The multi-tenancy concept in Frappe is that a new site comes with a new login and user management.
If I use an analogy:
In frappe, an app is code and logic, which needs to be installed on a site. A site is a database. It’s like a tent (app) and land (site). You build a tent then look for land to set it up.
What we would like is to have one tent (or group of related tents) covering several pieces of land (multiple sites/databases).
This way, we can have one login then install multiple apps - bulk sms, call center etc. We would like new apps are to have the option of being configured to different databases other than the one erpnext is running on for better scalability - bulk sms especially can hog the ERPNext instance if the customer decides to dispatch millions of messages at a go or if we get an influx of calls.
Yes, we want multitenancy but not in the default way that Frappe handles. Our application will host multiple companies on same instance. Good thing is Frappe can handle multi company setup via permission manager. But we also need federated db setup for one instance.
TLDR Version
Basically, in site config, how can we specify the db that each app should use?
We want multiple apps on same bench on one site config but the apps should be able to access different databases.
Later for a use case I used MongoDB as database and NodeJS as runtime. (active in production).
example: User visits app url (bulk-sms.example.com), gets redirected to central auth server (erp.example.com) for login, there user can login or choose to social login, after successful login user gets redirected back to the OAuth client app (bulk-sms.example.com).