gritzko / swarm

JavaScript replicated model (M of MVC) library
http://swarmdb.net/
MIT License
2.68k stars 97 forks source link

Synchronisation doesn't works proper in Demo3 example #36

Closed chicoxyzzy closed 8 years ago

chicoxyzzy commented 9 years ago

http://ppyr.us:8001/demo3/index.html

Steps to reproduce bug:

Now data is inconsistent. The order of last two steps is important.

gritzko commented 9 years ago

Reproduced. Thanks.

gritzko commented 9 years ago

Sorry for the delay. The issue is related to .init event relay optimizations and it caused a little bit of refactoring.

jimthedev commented 9 years ago

I can't reproduce this. Is it still an issue?

gritzko commented 9 years ago

If it does not reproduce then it is another bug. Kidding. Sorry, there are some entangled issues and it created an avalanche effect. Will be fixed in 0.4, with the new version vector scheme.

jimthedev commented 9 years ago

Cool! Thank you @gritzko. I am fascinated by this project.

abalandin commented 9 years ago

fixed in https://github.com/gritzko/swarm/pull/45 Use someSyncable.onStateReady(callback); instead of someSyncable.on('.init', callback); to be sure the syncable-object has some state.