How does Echo deal with conflicts?


I could try several scenarios, but I'm wondering how would Echo resolve conflicts? 
Imagine that each record has some fields: First, Last, Age and I have a desktop and a smartphone.

1- For the same record, if you change the Lastname on the desktop and the FirstName on a mobile, my guess is that it would correctly behave when reconciling as there is no conflict. The record will have the new First, the new Last. Correct?

2- What if you edit the Age in a record on the desktop, then on the mobile. It has been changed in both environment. Which editing wins? The most recent one?
Is there a way to open a dialog box and ask for the user to pick which info is correct?

3- If you delete a record on the desktop, don't sync, and edit that same record on the smartphone, change some info. What happens next when syncing (reconciling)? Is the record deleted on all nodes, or since it has been edited on the smartphone after the desktop delete, is it brought back to the desktop with the latest information?

Thanks for any clarification

Hello Steve,

1. Correct, with some reservations. It depends on how you save data. Usually yes, because Aurelius will know which columns were changed. But depending on how you use Aurelius, it will log that all fields were modified, not FirstName, only. If for example you call Manager.Update(Entity) and Entity was loaded from another manager, Aurelius won't know which columns were changed - it will perform an UPDATE statement in all columns, and will log modifications to Echo telling so. But usually, yes, only modified fields in each client will be replicated.

2. The most "recent" one, yes. And the most recent one is not even necessarily the one that was last modified by the user. It's the one that is last imported. You might have user A and B modifying the same record, in that order, but it might happen that replication data from user B arrives first in the server than data from user A. In this case, A will win. 
There is no mechanism to reconcile this, because everything is "asynchronous" and decentralized. And even consider this scenario: what if record in being updated from user B, but the same record was updated from user B nine years ago. Should a dialog box be displayed for the user?
But I digress, in summary it will simply apply the last modifications.

3. Again, last wins. It might be first deleted and then reinserted upon update. Or it can be updated, and then deleted.

Note that you can add Aurelius version control, which is an Aurelius-specific feature, and that will be applied to Echo replication as well:


Thanks for the prompt reply, it clarifies everything. I now know how to ride that path :-)