wukong-m2m / wukong-darjeeling

Darjeeling for WuKong
Other
20 stars 17 forks source link

[New Design] VM property propagation #26

Open pencilcheck opened 11 years ago

pencilcheck commented 11 years ago

Current implementation loops through properties that need to be pushed and iterate through all links that matched certain patterns, and if one of the links (one-to-many) has failed, the function will continue sending the rest of the links and then aggregate the error code in the return value, so the error callback will be called after the function has returned. However, if there are n links, and the second to the last link has failed, should we put the property back to the queue and let it reiterate all links that has sent last loop again?

We should consider a new design that iterate through links, and mark the links for dirty instead. This way only the links that needs to be pushed will be pushed again next loop if failed in the previous loop. And we would also need a function to mark several links dirty if one of the property has been changed.

The new design should also consider pulling as well.