Sha256: 199b6e7c37e9452af4fe94da999520271af29ee1247ee3b227743b5e213a1fc8
Contents?: true
Size: 1.3 KB
Versions: 31
Compression:
Stored size: 1.3 KB
Contents
overall subject of voting is '/blah' all nodes denote presence create('/blah/nodes/id', '', :ephemeral => true) coordinator notes children('/blah/nodes/id', watch: true) if any presence nodes are deleted, the transaction is aborted nodes children('/blah/tx', watch: true) coordinator voteseq = create('/blah/tx/vote', 'proposal', sequential: true) # beginning of election coordinator children('/blah/tx/voteseq', watch: true) # loop until all nodes checked in nodes children('/blah/tx') nodes children('/blah/tx/voteseq', watch: true) # all nodes voted, then commit nodes get('/blah/tx/voteseq', watch: true) # if data == 'abort' then delete id node nodes get('/blah/tx/votes_uuid/result' watch: true) # result will be placed here? nodes create('/blah/tx/voteseq/id', up_or_down, ephemeral: true) # any node votes down, abort # coordinator sees all votes have been cast # NOTE: is this step necessary? the coordinator confirming? coordinator create('/blah/tx/voteseq/result', up_or_down, ephemeral: true) # nodes tear down node delete('/blah/tx/voteseq/id') # when just result node is left coordinator rm_rf('/blah/tx/voteseq') # at many points we need a timer to see if things are taking too long
Version data entries
31 entries across 31 versions & 1 rubygems