danielgerlag / workflow-core

Lightweight workflow engine for .NET Standard
MIT License
5.34k stars 1.19k forks source link

Single DB for multiple workflow instances #575

Open sivavaddadi opened 4 years ago

sivavaddadi commented 4 years ago

hi Daniel,

We are building a wrapper Workflow API on top of workflow core This API will have to support 2 applications Thats why we are creating 2 separate deployments of the API like app1-workflow-api, app2-worlflow-api to cater to each application

Is it OK to share a common database between both the API deployments/instances Will it have any performance implications when each API instance is polling DB and workflows unrelated to the application the API is serving are there in DB but need to be ignored by the API

Is this a reasonable way of designing or its recommended for each instance of API to have its own DB

Thanks, Siva

danielgerlag commented 4 years ago

I think rather use 2 databases, or use different schema names and hence a different set of tables within the same DB if you must use 1 DB.

sivavaddadi commented 4 years ago

Thank you Daniel. We are using MongoDB and at the moment do not see a provision to configure the schema name. Its hardcoded in MongoPersistenceProvider. Any plans to make it configurable like the way we can configure/provide the DB with project specific name in MongoPersistenceProvider constructor

Thanks, Siva