Question

I want to connect to multiple databases at the same time in openbravo so I would be able to store data in two different databases(for example: mysql and postgresql) for any transaction in the app.

Is there any clean way to do that and keep minimal changes to the existing code?

Thanks

Was it helpful?

Solution

I think, you should use replication for this task. It would be more clean and right solution from application architecture perspective.

You might configure 2 databases (with some out of-the-box solution or boiler-plate code). But it would decrease the application performance because each time when app would trigger a query, it must be executed at two DB instances. And in case of transactions, it would get even more complex/slow.

So replication is best way for such task. If you want to use selective replication use Tungsten. Let me know your specific need that can't be met with replication. I might point some more ideas for that.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top