Licensed under a Creative Commons Attribution-NonCommercial 3.0 New Zealand License CASSANDRA SUMMIT SF 2014 CONTRIBUTOR BOOT CAMP Licensed under a Creative Commons Attribution-NonCommercial 3.0 New Zealand License Aaron Morton @aaronmorton Co-Founder & Principal Consultant
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Licensed under a Creative Commons Attribution-NonCommercial 3.0 New Zealand License
CASSANDRA SUMMIT SF 2014
CONTRIBUTOR BOOT CAMP
Licensed under a Creative Commons Attribution-NonCommercial 3.0 New Zealand License
o.a.c.net.MessageIn<T> public class MessageIn<T> { public final InetAddress from; public final T payload; public final Map<String, byte[]> parameters; public final MessagingService.Verb verb; public final int version; … }
o.a.c.net.MessageOut<T> public class MessageOut<T> { public final InetAddress public final MessagingService.Verb verb; public final T payload; public final IVersionedSerializer<T> serializer; public final Map<String, byte[]> parameters; … }
o.a.c.net.MessagingService.verbStages !
new EnumMap<MessagingService.Verb, Stage>(MessagingService.Verb.class)
GossipDigest { final InetAddress endpoint; final int generation; final int maxVersion; … }
o.a.c.gms.Gossiper.examineGossiper() // If empty SYN send all my info (shadow gossip) !
if (remoteGeneration == localGeneration && maxRemoteVersion == maxLocalVersion) // do nothing !
else if (remoteGeneration > localGeneration) // we request everything from the gossiper !
else if (remoteGeneration < localGeneration) // send all data with generation = localgeneration and version >
o.a.c.gms.Gossiper.examineGossiper() else if (remoteGeneration == localGeneration) !
/* If the max remote version is greater then we request the remote endpoint send us all the data for this endpoint with version greater than the max version number we have locally for this endpoint. !
If the max remote version is lesser, then we send all the data we have locally for this endpoint with version greater than the max remote version. */
Thanks. !
Licensed under a Creative Commons Attribution-NonCommercial 3.0 New Zealand License
Aaron Morton @aaronmorton
!
Co-Founder & Principal Consultant www.thelastpickle.com
!
Licensed under a Creative Commons Attribution-NonCommercial 3.0 New Zealand License