[Openerp-community] Strategy for database replication

classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|

[Openerp-community] Strategy for database replication

Eric Caudal - www.elico-corp.com
Hi,
I have a customer with implantations in France and China. He wants to use the same data for both countries in the same OpenERP database. Nevertheless, Internet connexion is a little bit bumpy from/to China so he would like to create a bi-directional replication scheme between both countries. French user would connect to an OpenERP in France, linked with a PG in France and Chinese users would connect to an OpenERP located in China, linked to a PG in China. the idea is to get both PG would be synchronized in real time.

Does  somebody have experience to share on a replication scheme with 2 fully replicated databases over continents and used by 2 OpenERP (using same code) ? Is it feasable (I tend to say yes ;))? Is it advisable? Could the latency between databases be a problem?

Thanks for your input.
   
--
Eric CAUDAL
openerp
Eric CAUDAL, Elico Corp, Shanghai.
[hidden email]
Cell: + 86 186 2136 1670. Skype: elico.corp
Premium Certified Training Partner - OpenERP Ready Partner.

Premium CTP
http://www.openerp.net.cn

_______________________________________________
Mailing list: https://launchpad.net/~openerp-community
Post to     : [hidden email]
Unsubscribe : https://launchpad.net/~openerp-community
More help   : https://help.launchpad.net/ListHelp
Reply | Threaded
Open this post in threaded view
|

Re: [Openerp-community] Strategy for database replication

Raphael Valyi
Hello Eric,

Basically, aside from the technical aspects of the synchronization, you would have to deal entity by entity with the possible integrity errors detected at the synchronization times.
If instead you opt for a transactional replication (or multi-master transactional replication), that won't be any faster than having the same OpenERP instance and paying the network latency as you already experienced (in fact it's likely to be even slower).

I would say that except in rare situations such as when one of the two companies use the ERP only a little, it's better not having the same instance indeed. For instance we use the same ERP instance between Akretion France and Akretion Brazil (a US instance), but if we were 30+ encoding 100 records per day that wouldn't be reasonable anymore.

Suddenly you understand why companies like Google bet it all on non relational databases (noSQL), as it's not a problem to use GMail in a globalized company because of the technology they use. But something like accounting is kind of intrinsically transactional, so it's good we use a relational database at least for that.

At the end, except if one company has not an intensive usage, I would advise you to have two different instances and synchronize key entities asynchronously, dealing with every possible integrity error (less things synchronized => less integrity error risk, beware of combinatorial explosion of integrity errors). Like synchronizing the product catalog and the sale / purchase orders is pretty easy. Now, don't imagine a second you would synchronize the accounting moves. At best you would be able to consolidate the accounting reports at the end of each period.

As for an asynchronous dual instance synchronization logic, there are several option like the base_synchro module (I never used it) or the base_external_referential module we made for e-commerce synchronisation originally. It's not something very simple to achieve.

Regards,


-- 
Raphaël Valyi
Founder and consultant
+55 21 2516 2954



On Mon, May 7, 2012 at 11:20 PM, Eric Caudal <[hidden email]> wrote:
Hi,
I have a customer with implantations in France and China. He wants to use the same data for both countries in the same OpenERP database. Nevertheless, Internet connexion is a little bit bumpy from/to China so he would like to create a bi-directional replication scheme between both countries. French user would connect to an OpenERP in France, linked with a PG in France and Chinese users would connect to an OpenERP located in China, linked to a PG in China. the idea is to get both PG would be synchronized in real time.

Does  somebody have experience to share on a replication scheme with 2 fully replicated databases over continents and used by 2 OpenERP (using same code) ? Is it feasable (I tend to say yes ;))? Is it advisable? Could the latency between databases be a problem?

Thanks for your input.
   
--

openerp
Eric CAUDAL, Elico Corp, Shanghai.
[hidden email]
Cell: <a href="tel:%2B%2086%20186%202136%201670" value="+8618621361670" target="_blank">+ 86 186 2136 1670. Skype: elico.corp
Premium Certified Training Partner - OpenERP Ready Partner.

Premium CTP
http://www.openerp.net.cn

_______________________________________________
Mailing list: https://launchpad.net/~openerp-community
Post to     : [hidden email]
Unsubscribe : https://launchpad.net/~openerp-community
More help   : https://help.launchpad.net/ListHelp



_______________________________________________
Mailing list: https://launchpad.net/~openerp-community
Post to     : [hidden email]
Unsubscribe : https://launchpad.net/~openerp-community
More help   : https://help.launchpad.net/ListHelp
Reply | Threaded
Open this post in threaded view
|

Re: [Openerp-community] Strategy for database replication

Eric Caudal - www.elico-corp.com
Hi Raphaël,
Thanks for the input. I was thinking more on the PG side but it seems that PG cannot handle multi-sync, only async replication.
Integrity error is my concern indeed. I see 2 options:
- 2 databases with limited synchronization through OpenERP (partner, products and CRM)
- 1 database with VPN access for outside users.

I tend to go to the second option in my case (few users in France compared with China)
Eric CAUDAL
openerp
Eric CAUDAL, Elico Corp, Shanghai.
[hidden email]
Cell: + 86 186 2136 1670. Skype: elico.corp
Premium Certified Training Partner - OpenERP Ready Partner.

Premium CTP
http://www.openerp.net.cn

On 05/08/2012 11:20 AM, Raphael Valyi wrote:
Hello Eric,

Basically, aside from the technical aspects of the synchronization, you would have to deal entity by entity with the possible integrity errors detected at the synchronization times.
If instead you opt for a transactional replication (or multi-master transactional replication), that won't be any faster than having the same OpenERP instance and paying the network latency as you already experienced (in fact it's likely to be even slower).

I would say that except in rare situations such as when one of the two companies use the ERP only a little, it's better not having the same instance indeed. For instance we use the same ERP instance between Akretion France and Akretion Brazil (a US instance), but if we were 30+ encoding 100 records per day that wouldn't be reasonable anymore.

Suddenly you understand why companies like Google bet it all on non relational databases (noSQL), as it's not a problem to use GMail in a globalized company because of the technology they use. But something like accounting is kind of intrinsically transactional, so it's good we use a relational database at least for that.

At the end, except if one company has not an intensive usage, I would advise you to have two different instances and synchronize key entities asynchronously, dealing with every possible integrity error (less things synchronized => less integrity error risk, beware of combinatorial explosion of integrity errors). Like synchronizing the product catalog and the sale / purchase orders is pretty easy. Now, don't imagine a second you would synchronize the accounting moves. At best you would be able to consolidate the accounting reports at the end of each period.

As for an asynchronous dual instance synchronization logic, there are several option like the base_synchro module (I never used it) or the base_external_referential module we made for e-commerce synchronisation originally. It's not something very simple to achieve.

Regards,


-- 
Raphaël Valyi
Founder and consultant
+55 21 2516 2954



On Mon, May 7, 2012 at 11:20 PM, Eric Caudal <[hidden email]> wrote:
Hi,
I have a customer with implantations in France and China. He wants to use the same data for both countries in the same OpenERP database. Nevertheless, Internet connexion is a little bit bumpy from/to China so he would like to create a bi-directional replication scheme between both countries. French user would connect to an OpenERP in France, linked with a PG in France and Chinese users would connect to an OpenERP located in China, linked to a PG in China. the idea is to get both PG would be synchronized in real time.

Does  somebody have experience to share on a replication scheme with 2 fully replicated databases over continents and used by 2 OpenERP (using same code) ? Is it feasable (I tend to say yes ;))? Is it advisable? Could the latency between databases be a problem?

Thanks for your input.
   
--

openerp
Eric CAUDAL, Elico Corp, Shanghai.
[hidden email]
Cell: <a moz-do-not-send="true" href="tel:%2B%2086%20186%202136%201670" value="+8618621361670" target="_blank">+ 86 186 2136 1670. Skype: elico.corp
Premium Certified Training Partner - OpenERP Ready Partner.

Premium
                              CTP
http://www.openerp.net.cn

_______________________________________________
Mailing list: https://launchpad.net/~openerp-community
Post to     : [hidden email]
Unsubscribe : https://launchpad.net/~openerp-community
More help   : https://help.launchpad.net/ListHelp



_______________________________________________
Mailing list: https://launchpad.net/~openerp-community
Post to     : [hidden email]
Unsubscribe : https://launchpad.net/~openerp-community
More help   : https://help.launchpad.net/ListHelp
Reply | Threaded
Open this post in threaded view
|

Re: [Openerp-community] Strategy for database replication

Dominique Chabord
In reply to this post by Eric Caudal - www.elico-corp.com
Hello

Le 08/05/2012 04:20, Eric Caudal a écrit :
> Hi,
> I have a customer with implantations in France and China. He wants to
> use the same data for both countries in the same OpenERP database.
> Nevertheless, Internet connexion is a little bit bumpy from/to China so
> he would like to create a bi-directional replication scheme between both
> countries.

I would first consider a simple remote desktop like NX instead, and
locate server and desktops in a datacenter. This is a cheap and secure
solution I propose on my hosting for distant countries.

regards

--
Dominique Chabord - SISalp
Logiciel libre pour l'entreprise : Gestion OpenERP et Tryton
18 avenue Beauregard 74960 Cran Gevrier
145A rue Alexandre Borrely 83000 Toulon
tél +33(0)950274960 fax +33(0)955274960 mob +33(0)622616438
http://sisalp.fr

_______________________________________________
Mailing list: https://launchpad.net/~openerp-community
Post to     : [hidden email]
Unsubscribe : https://launchpad.net/~openerp-community
More help   : https://help.launchpad.net/ListHelp
Reply | Threaded
Open this post in threaded view
|

Re: [Openerp-community] Strategy for database replication

Mario Arias
+1

Not sure how many users would be connecting from France, but access thru VPN or remote desktops will surely provoke less maintenance problems...

You can measure network comsumption to the OpenERP server on their France location, and then check if you can provide that between offices...

Regards,
-Mario


On Tue, May 8, 2012 at 1:12 AM, Dominique Chabord <[hidden email]> wrote:
Hello

Le 08/05/2012 04:20, Eric Caudal a écrit :
> Hi,
> I have a customer with implantations in France and China. He wants to
> use the same data for both countries in the same OpenERP database.
> Nevertheless, Internet connexion is a little bit bumpy from/to China so
> he would like to create a bi-directional replication scheme between both
> countries.

I would first consider a simple remote desktop like NX instead, and
locate server and desktops in a datacenter. This is a cheap and secure
solution I propose on my hosting for distant countries.

regards

--
Dominique Chabord - SISalp
Logiciel libre pour l'entreprise : Gestion OpenERP et Tryton
18 avenue Beauregard 74960 Cran Gevrier
145A rue Alexandre Borrely 83000 Toulon
tél <a href="tel:%2B33%280%29950274960" value="+33950274960">+33(0)950274960 fax <a href="tel:%2B33%280%29955274960" value="+33955274960">+33(0)955274960 mob <a href="tel:%2B33%280%29622616438" value="+33622616438">+33(0)622616438
http://sisalp.fr

_______________________________________________
Mailing list: https://launchpad.net/~openerp-community
Post to     : [hidden email]
Unsubscribe : https://launchpad.net/~openerp-community
More help   : https://help.launchpad.net/ListHelp


_______________________________________________
Mailing list: https://launchpad.net/~openerp-community
Post to     : [hidden email]
Unsubscribe : https://launchpad.net/~openerp-community
More help   : https://help.launchpad.net/ListHelp
Reply | Threaded
Open this post in threaded view
|

Re: [Openerp-community] Strategy for database replication

NF informatique
Hello,

NX is really a great solution, allowing you to use GTK from everywhere. NoMachine even allow a "web companion" that can run a session from browser (easier to deploy). I use it everyday from several access and it is quite as fast as a local install, but my experience showed me that NX protocol become unstable when ping time raise upper than 200ms. Anyway the web interface (that became more reactive in 6.1 version with AJAX) should be usable from everywhere.

In my mind using a synchronous database from several access is easier to implement this way than doing a 2-points sync database that can lead to a split-brain if connection is lost (so blocking each part instead of blocking only one for NX/web access) and will be slow on each request.

Another solution can be to create a satellite database and often sync/import it into main database, but this would need quite more work.

Anyway I have a draft demo version of NX/OERP online (servers are in switzerland). I can provide you access code if you want to run a simple test from China. Just ask me.

Best regards

Nicolas


On 08. 05. 12 18:13, Mario Arias wrote:
+1

Not sure how many users would be connecting from France, but access thru VPN or remote desktops will surely provoke less maintenance problems...

You can measure network comsumption to the OpenERP server on their France location, and then check if you can provide that between offices...

Regards,
-Mario


On Tue, May 8, 2012 at 1:12 AM, Dominique Chabord <[hidden email]> wrote:
Hello

Le 08/05/2012 04:20, Eric Caudal a écrit :
> Hi,
> I have a customer with implantations in France and China. He wants to
> use the same data for both countries in the same OpenERP database.
> Nevertheless, Internet connexion is a little bit bumpy from/to China so
> he would like to create a bi-directional replication scheme between both
> countries.

I would first consider a simple remote desktop like NX instead, and
locate server and desktops in a datacenter. This is a cheap and secure
solution I propose on my hosting for distant countries.

regards

--
Dominique Chabord - SISalp
Logiciel libre pour l'entreprise : Gestion OpenERP et Tryton
18 avenue Beauregard 74960 Cran Gevrier
145A rue Alexandre Borrely 83000 Toulon
tél <a moz-do-not-send="true" href="tel:%2B33%280%29950274960" value="+33950274960">+33(0)950274960 fax <a moz-do-not-send="true" href="tel:%2B33%280%29955274960" value="+33955274960">+33(0)955274960 mob <a moz-do-not-send="true" href="tel:%2B33%280%29622616438" value="+33622616438">+33(0)622616438
http://sisalp.fr

_______________________________________________
Mailing list: https://launchpad.net/~openerp-community
Post to     : [hidden email]
Unsubscribe : https://launchpad.net/~openerp-community
More help   : https://help.launchpad.net/ListHelp



_______________________________________________
Mailing list: https://launchpad.net/~openerp-community
Post to     : [hidden email]
Unsubscribe : https://launchpad.net/~openerp-community
More help   : https://help.launchpad.net/ListHelp


_______________________________________________
Mailing list: https://launchpad.net/~openerp-community
Post to     : [hidden email]
Unsubscribe : https://launchpad.net/~openerp-community
More help   : https://help.launchpad.net/ListHelp