I 开发者_如何学Pythonhave composite objects, that compound of other objects. Two clients changed the objects internals in two separate copies, and I want to merge those changes, what is the best approach to do so, and is there a framework to support such operation?
Thanks, Ohad.If your objects are plain old java beans, then you could use reflection to compare all properties between 2 objects. Commons BeanUtils can help with that.
But you'll have to implement some conflict resolution strategy. If the same property has been changed by both clients. The easiest would be "the-latest-change-wins" strategy - a change with latest "lastUpdateTime" overwrites any other change.
 
         
                                         
                                         
                                         
                                        ![Interactive visualization of a graph in python [closed]](https://www.devze.com/res/2023/04-10/09/92d32fe8c0d22fb96bd6f6e8b7d1f457.gif) 
                                         
                                         
                                         
                                         加载中,请稍侯......
 加载中,请稍侯......
      
精彩评论