Skip to content

Instantly share code, notes, and snippets.

@galderz
Forked from danberindei/HotRodSegmentsProposal
Last active August 29, 2015 13:57
Show Gist options
  • Save galderz/9464047 to your computer and use it in GitHub Desktop.
Save galderz/9464047 to your computer and use it in GitHub Desktop.
Here's an updated version of the segments proposal.
Response header with topology change marker
Topology Id [vInt]
Num servers in topology [vInt]
m1: Host/IP length [vInt] m1: Host/IP address [string] m1: Port [2b - unsigned short]
m2: Host/IP length [vInt] m2: Host/IP address [string] m2: Port [2b - unsigned short]
Hash Function Version [1b]
Num segments in topology [vInt]
s1: Num owners [1b] s1: 1st owner's index [vInt] s1: 2nd owner's index [vInt]
s2: Num owners [1b] s2: 1st owner's index [vInt] s2: 2nd owner's index [vInt]
...
@galderz
Copy link
Author

galderz commented Mar 10, 2014

It really is not necessary to send segment hash ends to the client, since it can easily calculate them given the segment size and number of segments.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment