Global question : can we mark a message as obsolete before it consummed by a client ?
Context:
- I have a cluster of machines
- Each machine send message when something change
- The message is a Rails object that changed
- The client, when getting this message, juste save it
Scenario
- Given 3 machines A, B and C
- Given the object O belongs to machine A
- A is out of network
- There is lot of changes on object O on machine A
When network is up again, I'd like to cancel all the messages regarding O, except the last one (producer side or consummer side). So B and C will not save all the states of the O object, but only the last 开发者_运维问答one.
Questions :
- Do you think it is possible ?
- Is there a better way to achieve syncronisation (we don't want to use MySQL cluster)
Thank you.
we are doing something silimar (in .net but) if a node goes off network or restarts then when it comes back the first thing it does is ask all the other nodes to a status upadte. All the node send this to all nodes. We then use a time stamp to only act on a message if its more recent than the last last one processed. Appears to work just fine for what we need which is 5 worker nodes all with the same configuration and syncing any chnages between themselves.
精彩评论