Entity Sync

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

Entity Sync

porkiey
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
Reply | Threaded
Open this post in threaded view
|

RE: Entity Sync

Amit Shinde
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:[hidden email]]
Sent: Wednesday, November 26, 2008 5:35 PM
To: [hidden email]
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=

Reply | Threaded
Open this post in threaded view
|

Re: Entity Sync

porkiey
Many thanks Amit - that great!


On 26/11/2008 20:57, "Amit Shinde" <[hidden email]> 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:[hidden email]]
Sent: Wednesday, November 26, 2008 5:35 PM
To: [hidden email]
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: [hidden email]
Reply | Threaded
Open this post in threaded view
|

Re: Entity Sync

hans_bakker
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" <[hidden email]> 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:[hidden email]]
> Sent: Wednesday, November 26, 2008 5:35 PM
> To: [hidden email]
> 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: [hidden email]
--
Antwebsystems.com: Quality OFBiz services for competitive prices

Reply | Threaded
Open this post in threaded view
|

Re: Entity Sync

Amit Shinde
In reply to this post by porkiey
yes, for sure. I will create a JIRA issue and attach a patch soon.

Hans Bakker wrote:

> 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" <[hidden email]> 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:[hidden email]]
>> Sent: Wednesday, November 26, 2008 5:35 PM
>> To: [hidden email]
>> 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: [hidden email]
>>


Reply | Threaded
Open this post in threaded view
|

Re: Entity Sync

Jacques Le Roux
Administrator
In reply to this post by hans_bakker
+1

Jacques

From: "Hans Bakker" <[hidden email]>

> 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" <[hidden email]> 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:[hidden email]]
>> Sent: Wednesday, November 26, 2008 5:35 PM
>> To: [hidden email]
>> 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: [hidden email]
> --
> Antwebsystems.com: Quality OFBiz services for competitive prices
>