You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ofbiz.apache.org by Sam Hamilton <sa...@virtualvillage.com> on 2008/11/26 13:04:52 UTC

Entity Sync

Quick question - with the entity sync function can you run push and pull at the same time?
I have a feeling that this is not a good idea but still trying to work out how the sync works exactly.

We have it up and running between three locations.
We consider the master database in Hong Kong with remote servers in USA and China.

Thanks
Sam

Re: Entity Sync

Posted by Jacques Le Roux <ja...@les7arts.com>.
+1

Jacques

From: "Hans Bakker" <ma...@antwebsystems.com>
> is this something which could be contributed back into the core system?
> 
> On Thu, 2008-11-27 at 04:41 -0600, Sam Hamilton wrote:
>> Many thanks Amit - that great!
>> 
>> 
>> On 26/11/2008 20:57, "Amit Shinde" <am...@amicontech.com> wrote:
>> 
>> Hey Sam,
>> 
>> 
>> 
>> Although, we can schedule the push and pull services at different times
>> through RecurrenceRule, there is still a possibility that push and pull
>> might run at the same time. To make sure this doesnt happen, you can write a
>> piece of code in both runPullEntitySync and runEntitySync services that
>> checks whether runEntitySync or runPullEntitySync service is running or not
>> through JobSandbox table. So when in runPullEntitySync, we check whether
>> runEntitySync service is running and if it is, we return an error and this
>> re-schedules runPullEntitySync service again for later.
>> 
>> 
>> 
>> This should make both services mutuallly exclusive. Its the first pull that
>> takes hours, but after that it should be quick enough. So scheduling push
>> pull service in a gap of 1-2 hours should work.
>> 
>> 
>> 
>> I am sure you must have referred this document -
>> http://docs.ofbiz.org/display/OFBIZ/Sync+Setup+Notes+and+Example but that
>> should be some information.
>> 
>> 
>> 
>> Also, on another note, I had an issue with Inventory when pushing data
>> across. The problem occurred when a new InventoryItem record was created on
>> POS. So now when that InventoryItem is created on MCS, it triggers an ECA
>> service 'createInventoryItemCheckSetAtpQoh' and this creates
>> InventoryItemDetail records again thus doubling the inventory as
>> InventoryItemDetail records for the same InventoryItem were being pushed as
>> well. I had to filter InventoryItemDetail records from the create records
>> list before push to avoid this problem.
>> 
>> 
>> 
>> 
>> 
>> Hope this helps,
>> 
>> Thanks,
>> 
>> 
>> 
>> Amit Shinde
>> 
>> 
>> 
>> Amicon Technologies Pvt. Ltd., Mumbai, India.
>> 
>> India's No.1 OFBiz service provider
>> 
>> 
>> 
>> -----Original Message-----
>> From: Sam Hamilton [mailto:sam.hamilton@virtualvillage.com]
>> Sent: Wednesday, November 26, 2008 5:35 PM
>> To: user@ofbiz.apache.org
>> Subject: Entity Sync
>> 
>> 
>> 
>> Quick question - with the entity sync function can you run push and pull at
>> the same time?
>> 
>> I have a feeling that this is not a good idea but still trying to work out
>> how the sync works exactly.
>> 
>> 
>> 
>> We have it up and running between three locations.
>> 
>> We consider the master database in Hong Kong with remote servers in USA and
>> China.
>> 
>> 
>> 
>> Thanks
>> 
>> Sam=
>> 
>> 
>> 
>> Sam Hamilton
>> CTO
>> Virtual Village
>> 
>> Tel: +86 (21) 6271 3051
>> Fax: +86 (21) 6271 3021
>> Mobile: +86 (135) 2451 4480
>> E-mail: sam.hamilton@virtualvillage.com
> -- 
> Antwebsystems.com: Quality OFBiz services for competitive prices
>

Re: Entity Sync

Posted by Hans Bakker <ma...@antwebsystems.com>.
is this something which could be contributed back into the core system?

On Thu, 2008-11-27 at 04:41 -0600, Sam Hamilton wrote:
> Many thanks Amit - that great!
> 
> 
> On 26/11/2008 20:57, "Amit Shinde" <am...@amicontech.com> wrote:
> 
> Hey Sam,
> 
> 
> 
> Although, we can schedule the push and pull services at different times
> through RecurrenceRule, there is still a possibility that push and pull
> might run at the same time. To make sure this doesnt happen, you can write a
> piece of code in both runPullEntitySync and runEntitySync services that
> checks whether runEntitySync or runPullEntitySync service is running or not
> through JobSandbox table. So when in runPullEntitySync, we check whether
> runEntitySync service is running and if it is, we return an error and this
> re-schedules runPullEntitySync service again for later.
> 
> 
> 
> This should make both services mutuallly exclusive. Its the first pull that
> takes hours, but after that it should be quick enough. So scheduling push
> pull service in a gap of 1-2 hours should work.
> 
> 
> 
> I am sure you must have referred this document -
> http://docs.ofbiz.org/display/OFBIZ/Sync+Setup+Notes+and+Example but that
> should be some information.
> 
> 
> 
> Also, on another note, I had an issue with Inventory when pushing data
> across. The problem occurred when a new InventoryItem record was created on
> POS. So now when that InventoryItem is created on MCS, it triggers an ECA
> service 'createInventoryItemCheckSetAtpQoh' and this creates
> InventoryItemDetail records again thus doubling the inventory as
> InventoryItemDetail records for the same InventoryItem were being pushed as
> well. I had to filter InventoryItemDetail records from the create records
> list before push to avoid this problem.
> 
> 
> 
> 
> 
> Hope this helps,
> 
> Thanks,
> 
> 
> 
> Amit Shinde
> 
> 
> 
> Amicon Technologies Pvt. Ltd., Mumbai, India.
> 
> India's No.1 OFBiz service provider
> 
> 
> 
> -----Original Message-----
> From: Sam Hamilton [mailto:sam.hamilton@virtualvillage.com]
> Sent: Wednesday, November 26, 2008 5:35 PM
> To: user@ofbiz.apache.org
> Subject: Entity Sync
> 
> 
> 
> Quick question - with the entity sync function can you run push and pull at
> the same time?
> 
> I have a feeling that this is not a good idea but still trying to work out
> how the sync works exactly.
> 
> 
> 
> We have it up and running between three locations.
> 
> We consider the master database in Hong Kong with remote servers in USA and
> China.
> 
> 
> 
> Thanks
> 
> Sam=
> 
> 
> 
> Sam Hamilton
> CTO
> Virtual Village
> 
> Tel: +86 (21) 6271 3051
> Fax: +86 (21) 6271 3021
> Mobile: +86 (135) 2451 4480
> E-mail: sam.hamilton@virtualvillage.com
-- 
Antwebsystems.com: Quality OFBiz services for competitive prices


Re: Entity Sync

Posted by Sam Hamilton <sa...@virtualvillage.com>.
Many thanks Amit - that great!


On 26/11/2008 20:57, "Amit Shinde" <am...@amicontech.com> wrote:

Hey Sam,



Although, we can schedule the push and pull services at different times
through RecurrenceRule, there is still a possibility that push and pull
might run at the same time. To make sure this doesnt happen, you can write a
piece of code in both runPullEntitySync and runEntitySync services that
checks whether runEntitySync or runPullEntitySync service is running or not
through JobSandbox table. So when in runPullEntitySync, we check whether
runEntitySync service is running and if it is, we return an error and this
re-schedules runPullEntitySync service again for later.



This should make both services mutuallly exclusive. Its the first pull that
takes hours, but after that it should be quick enough. So scheduling push
pull service in a gap of 1-2 hours should work.



I am sure you must have referred this document -
http://docs.ofbiz.org/display/OFBIZ/Sync+Setup+Notes+and+Example but that
should be some information.



Also, on another note, I had an issue with Inventory when pushing data
across. The problem occurred when a new InventoryItem record was created on
POS. So now when that InventoryItem is created on MCS, it triggers an ECA
service 'createInventoryItemCheckSetAtpQoh' and this creates
InventoryItemDetail records again thus doubling the inventory as
InventoryItemDetail records for the same InventoryItem were being pushed as
well. I had to filter InventoryItemDetail records from the create records
list before push to avoid this problem.





Hope this helps,

Thanks,



Amit Shinde



Amicon Technologies Pvt. Ltd., Mumbai, India.

India's No.1 OFBiz service provider



-----Original Message-----
From: Sam Hamilton [mailto:sam.hamilton@virtualvillage.com]
Sent: Wednesday, November 26, 2008 5:35 PM
To: user@ofbiz.apache.org
Subject: Entity Sync



Quick question - with the entity sync function can you run push and pull at
the same time?

I have a feeling that this is not a good idea but still trying to work out
how the sync works exactly.



We have it up and running between three locations.

We consider the master database in Hong Kong with remote servers in USA and
China.



Thanks

Sam=



Sam Hamilton
CTO
Virtual Village

Tel: +86 (21) 6271 3051
Fax: +86 (21) 6271 3021
Mobile: +86 (135) 2451 4480
E-mail: sam.hamilton@virtualvillage.com

RE: Entity Sync

Posted by Amit Shinde <am...@amicontech.com>.
Hey Sam,

 

Although, we can schedule the push and pull services at different times
through RecurrenceRule, there is still a possibility that push and pull
might run at the same time. To make sure this doesnt happen, you can write a
piece of code in both runPullEntitySync and runEntitySync services that
checks whether runEntitySync or runPullEntitySync service is running or not
through JobSandbox table. So when in runPullEntitySync, we check whether
runEntitySync service is running and if it is, we return an error and this
re-schedules runPullEntitySync service again for later.

 

This should make both services mutuallly exclusive. Its the first pull that
takes hours, but after that it should be quick enough. So scheduling push
pull service in a gap of 1-2 hours should work.

 

I am sure you must have referred this document -
http://docs.ofbiz.org/display/OFBIZ/Sync+Setup+Notes+and+Example but that
should be some information.

 

Also, on another note, I had an issue with Inventory when pushing data
across. The problem occurred when a new InventoryItem record was created on
POS. So now when that InventoryItem is created on MCS, it triggers an ECA
service 'createInventoryItemCheckSetAtpQoh' and this creates
InventoryItemDetail records again thus doubling the inventory as
InventoryItemDetail records for the same InventoryItem were being pushed as
well. I had to filter InventoryItemDetail records from the create records
list before push to avoid this problem.

 

 

Hope this helps,

Thanks,

 

Amit Shinde

 

Amicon Technologies Pvt. Ltd., Mumbai, India.

India's No.1 OFBiz service provider

 

-----Original Message-----
From: Sam Hamilton [mailto:sam.hamilton@virtualvillage.com] 
Sent: Wednesday, November 26, 2008 5:35 PM
To: user@ofbiz.apache.org
Subject: Entity Sync

 

Quick question - with the entity sync function can you run push and pull at
the same time?

I have a feeling that this is not a good idea but still trying to work out
how the sync works exactly.

 

We have it up and running between three locations.

We consider the master database in Hong Kong with remote servers in USA and
China.

 

Thanks

Sam=