c# - Object Syncronization Between Multiple Clients Algorithm -
Is not because to sort things as I sorted.
To start I do not have to worry about the conflict because clients can only add to the object collection. But I am struggling to work in my head, how the clans interact, what things need to be transferred to each other.
I think that has been done many times before, and should be of some type
UPDATE:
I think I'm asking if there is one way to sync the cycle through all the objects on each peer and check that they are present at the other end
If you use INotifyPropertyChanged
of serializable objects that implement ObservableCollection
Objects can queue for objects because they change. If you have objects that require synchronization in a hashset
, you can avoid double-entry in the queue at the expense of linear order. If you carefully override GetHashCode ()
, or gives a strong hash better way, you can filter the item that changes equally on both ends.
Edit: Initial sync, create a packet that lists the generated hash of all existing objects as binary blocks. In this way the exchange is quick.
Comments
Post a Comment