-
Hello! We would like to guard against connectivity issues that vary per user situation. Warm Regards |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 5 replies
-
Great idea. Any thoughts on how this would work with batches? As I understand DMS, a large number of changes may be batched into separate json files which are individually posted to the server via https. If a single upsert in a batch fails, the batch fails. This doesn't seem to cause other batches to fail. However subsequent attempts to sync seem to retry batches that have already failed. Your suggestion would cause subsequent batches to fail, as well as rolling back previous successful batches. If my understanding is correct, DMS would then retry all those batches next sync. This could cause an app to effectively hang. I may be mistaken. This suggestion would require all batches to be included in a single database transaction on the server. Is that the idea? I wonder about the impact on the web server and the database server. Say for example a product catalog is rolled out to thousands of users. DMS can feed those updates to the server a batch at a time, lowering overhead on the servers. How would that scenario be handled? We're experimenting with DMS and run those big updates inside a transaction on a local db before syncing to the server. This means the all-or-none has already been dealt with. It may be that a large update that succeeds on the server, fails on one of more clients. Should that sync down be transactional? Maybe transactional sync should be optional and directional? Lots of thinking to do here and maybe lots of work by better developers than me 😄 |
Beta Was this translation helpful? Give feedback.
-
Hi @Mimetis, would it be possible to create a context for the remote server, begin a transaction, and then hand off the context to DMS to sync and if there are errors, rollback the remote server's initial transaction? @VagueGit, interesting ideas. I'm not sure how that would be handled. |
Beta Was this translation helpful? Give feedback.
-
Hello @Tlocke1 Basically, everything is transactional, even if we don't have one single transaction, since we have several participants in a sync. 2 transactions are basically just reading data. No data are modified / inserted/ deleted Here is a simplified workflow, focusing only on the sync mechanism (I will not detail here everything around provisioning or dedicated methods):
Now what happened in different situation:
Regarding these different scenario, you should not have any "un-synchronized" situation due to a failed transaction. Make sense ? |
Beta Was this translation helpful? Give feedback.
Hello @Tlocke1
Basically, everything is transactional, even if we don't have one single transaction, since we have several participants in a sync.
We can count basically 4 transactions in the complete workflow. 2 on clients (reading then applying) and 2 on server (applying then reading)
2 transactions are basically just reading data. No data are modified / inserted/ deleted
2 transactions are for applying changes on server or client
Here is a simplified workflow, focusing only on the sync mechanism (I will not detail here everything around provisioning or dedicated methods):