3

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

Stan Kurilin
  • 15,614
  • 21
  • 81
  • 132
Feras Odeh
  • 9,136
  • 20
  • 77
  • 121

1 Answers1

1

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.

Asif Shahzad
  • 843
  • 2
  • 11
  • 21