zeiss-digital-innovation / SynchronizeFX

JavaFX data-binding between JVMs over the network
GNU Lesser General Public License v3.0
54 stars 10 forks source link

When 2 client change the same property at the same time they may are unsynchron. #16

Open rbi opened 10 years ago

rbi commented 10 years ago

The server does not send changes originating from a client back to the same client. It does only send them to all other clients.

Suppose there are 2 clients A and B connected to a serve.

If client A sends a change of a property, the server sends these changes only to client B. If client B send a change of the same property before it recieves the change of A, the server does send this change only to A. When B than recieves the change of A, the same property has different values in both clients.

rbi commented 10 years ago

Just sending all changes to all clients including the client that send them is not possible as this would result in flickering in continuously changing properties, like the position property of the slider in the slider demo.

It also would result in duplicated add and remove operations on ListProperties if no additional countermeasures are taken. All other properties (Set, Map, single value properties) should have no problems with duplicate remove and set operations except for the flickering.

rbi commented 9 years ago

Single Value Properties and ListProperties should eventually synchronize them selves now event if multiple clients do changes at the same time. Map Properties and Set Properties are still todo.

Also there needs to be ensured, that all changes on the domain model on the server are done in the same Thread. This is comperable to the JavaFX platform thread.