Sync tables between environments

How do you keep tables / entities synchronized between 2 different environments?

I have in "environment B" an entity that must be a replica of another entity in "environment A" (synchronize at least once a day)


I would also like to do this with a static entity, but in this case I have no idea what to do. 

Solution

Hi Jose,

I had the same case in my work.

Following is the solution that we found.

For normal entities, and assuming that only the environment B depends of A, we created a rest API in env A to expose all the entity data. We also put a input DateTime, so we expose only the records that was updated since the given input (we use the last syncronization). In the env B we consumed the API throught a timer, and used the received data to update the entity at env B (using the original ID from env A).

For Static entities, the approach was different.  We created the entity and records in both environments, and added a new attribute in the records to "match" in each side. The choosed name for this attribute was "ExternalId" and we filled with a short and sugestive text (can be number too). For each new development, it is necessary to be in mind that both entities/records need to be mannually updated.

I hope this help you too!


Solution

Alexandre Soares wrote:

Hi Jose,

I had the same case in my work.

Following is the solution that we found.

For normal entities, and assuming that only the environment B depends of A, we created a rest API in env A to expose all the entity data. We also put a input DateTime, so we expose only the records that was updated since the given input (we use the last syncronization). In the env B we consumed the API throught a timer, and used the received data to update the entity at env B (using the original ID from env A).

For Static entities, the approach was different.  We created the entity and records in both environments, and added a new attribute in the records to "match" in each side. The choosed name for this attribute was "ExternalId" and we filled with a short and sugestive text (can be number too). For each new development, it is necessary to be in mind that both entities/records need to be mannually updated.

I hope this help you too!



Works fine, thank you :)