You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ofbiz.apache.org by Nicolas Malin <ni...@nereide.fr> on 2015/05/06 21:32:23 UTC

OFBiz on read only database

Hello,

For a customer site I deployed an OFBiz instance connected with a 
readonly postgres database (replicated slave).
To realize it, I created a new DAO implementation with only authorize 
the find and with some little entity engine configuration (disable 
eeca), this work pretty fine.

Do you realized an equivalent OFBiz deployment on read only database ? 
and How did you do ? I will appreciate some other feedback to check If 
my improvement toke the good ways and if it's interesting to contribute 
it on the project (code and wiki ;) ).

Nicolas

Re: OFBiz on read only database

Posted by Nicolas Malin <ni...@nereide.fr>.
Thanks Jacques,
Some links are precious :)

Le 07/05/2015 09:13, Jacques Le Roux a écrit :
> In the same situation we (when I worked with ilscipio) used pgPool-II, 
> there are other similar solutions
> https://wiki.postgresql.org/wiki/Replication,_Clustering,_and_Connection_Pooling 
>
>
> But I guess you were aware so why did you went this way? It would 
> indeed be interesting to know more about it!
>
> Note that now also exists http://www.postgres-xl.org/ 
> http://www.translattice.com/postgres_compare.shtml
>
> With the new Json support Postgres now competes with noSql DBMs as 
> long as there are not too much change 
> http://www.infoq.com/news/2015/04/Postgresql-JSON-Datastore , excerpt:
> <<Is PostgreSQL going to be your next JSON database? It seems that, 
> what PostgreSQL is good at, is storing the JSON document and 
> retrieving it quickly. What it isn’t still good at, is updating the 
> JSON document in place. If your dataset is in JSON and mutable, then 
> maybe one is better using a dedicated JSON data store instead of 
> PostgreSQL. If not, then PostgreSQL may be the best choice as it can 
> combine both relational and non-relational workloads at the same time.>>
>
> This will hopefully quickly improve...
>
> HTH
>
> Jacques
>
>
> Le 06/05/2015 21:32, Nicolas Malin a écrit :
>> Hello,
>>
>> For a customer site I deployed an OFBiz instance connected with a 
>> readonly postgres database (replicated slave).
>> To realize it, I created a new DAO implementation with only authorize 
>> the find and with some little entity engine configuration (disable 
>> eeca), this work pretty fine.
>>
>> Do you realized an equivalent OFBiz deployment on read only database 
>> ? and How did you do ? I will appreciate some other feedback to check 
>> If my improvement toke the good ways and if it's interesting to 
>> contribute it on the project (code and wiki ;) ).
>>
>> Nicolas
>>


Re: OFBiz on read only database

Posted by Jacques Le Roux <ja...@les7arts.com>.
In the same situation we (when I worked with ilscipio) used pgPool-II, there are other similar solutions
https://wiki.postgresql.org/wiki/Replication,_Clustering,_and_Connection_Pooling

But I guess you were aware so why did you went this way? It would indeed be interesting to know more about it!

Note that now also exists http://www.postgres-xl.org/ http://www.translattice.com/postgres_compare.shtml

With the new Json support Postgres now competes with noSql DBMs as long as there are not too much change 
http://www.infoq.com/news/2015/04/Postgresql-JSON-Datastore , excerpt:
<<Is PostgreSQL going to be your next JSON database? It seems that, what PostgreSQL is good at, is storing the JSON document and retrieving it 
quickly. What it isn’t still good at, is updating the JSON document in place. If your dataset is in JSON and mutable, then maybe one is better using a 
dedicated JSON data store instead of PostgreSQL. If not, then PostgreSQL may be the best choice as it can combine both relational and non-relational 
workloads at the same time.>>

This will hopefully quickly improve...

HTH

Jacques


Le 06/05/2015 21:32, Nicolas Malin a écrit :
> Hello,
>
> For a customer site I deployed an OFBiz instance connected with a readonly postgres database (replicated slave).
> To realize it, I created a new DAO implementation with only authorize the find and with some little entity engine configuration (disable eeca), this 
> work pretty fine.
>
> Do you realized an equivalent OFBiz deployment on read only database ? and How did you do ? I will appreciate some other feedback to check If my 
> improvement toke the good ways and if it's interesting to contribute it on the project (code and wiki ;) ).
>
> Nicolas
>

Re: OFBiz on read only database

Posted by Nicolas Malin <ni...@nereide.fr>.
Thanks Scott for your feedback,

in line
Le 07/05/2015 09:59, Scott Gray a écrit :
> I've seen it done with a separate Delegator but it needed a code change
> since there's no configurable way to disable the JobManager.
Sure, I found a easier solution on my case. I just changed the ofbiz 
instance name on the read only instance to be sure that the jobSandbox 
don't try to execute some job.
But a better way would be configure it through the service engine 
configuration.
>
> Main issues to be aware of:
> - Transaction isolation, you can't see uncommitted modifications made in
> same call chain
Exactly
> - If the read replica lags too far behind then you have issues if the code
> depends on the data being up to date
Mainly, I use this configuration only for the reporting, so we can't 
wait 30 seconds. For other case sys admin are available for that ;)

I open a jira issue to follow all ideas : 
https://issues.apache.org/jira/browse/OFBIZ-6401

Nicolas
>
> Regards
> Scott
> On 7 May 2015 08:01, "Nicolas Malin" <ni...@nereide.fr> wrote:
>
>> Hello,
>>
>> For a customer site I deployed an OFBiz instance connected with a readonly
>> postgres database (replicated slave).
>> To realize it, I created a new DAO implementation with only authorize the
>> find and with some little entity engine configuration (disable eeca), this
>> work pretty fine.
>>
>> Do you realized an equivalent OFBiz deployment on read only database ? and
>> How did you do ? I will appreciate some other feedback to check If my
>> improvement toke the good ways and if it's interesting to contribute it on
>> the project (code and wiki ;) ).
>>
>> Nicolas
>>


Re: OFBiz on read only database

Posted by Scott Gray <sc...@hotwaxsystems.com>.
I've seen it done with a separate Delegator but it needed a code change
since there's no configurable way to disable the JobManager.

Main issues to be aware of:
- Transaction isolation, you can't see uncommitted modifications made in
same call chain
- If the read replica lags too far behind then you have issues if the code
depends on the data being up to date

Regards
Scott
On 7 May 2015 08:01, "Nicolas Malin" <ni...@nereide.fr> wrote:

> Hello,
>
> For a customer site I deployed an OFBiz instance connected with a readonly
> postgres database (replicated slave).
> To realize it, I created a new DAO implementation with only authorize the
> find and with some little entity engine configuration (disable eeca), this
> work pretty fine.
>
> Do you realized an equivalent OFBiz deployment on read only database ? and
> How did you do ? I will appreciate some other feedback to check If my
> improvement toke the good ways and if it's interesting to contribute it on
> the project (code and wiki ;) ).
>
> Nicolas
>