<html><head><meta http-equiv="Content-Type" content="text/html charset=windows-1252"><meta http-equiv="Content-Type" content="text/html charset=windows-1252"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;"><br><div><div>On 08 Nov 2014, at 17:49, Benoit Chesneau <<a href="mailto:bchesneau@gmail.com">bchesneau@gmail.com</a>> wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><br class="Apple-interchange-newline"><br style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;"><div class="gmail_quote" style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;">On Thu, Oct 30, 2014 at 10:51 AM, Ulf Wiger<span class="Apple-converted-space"> </span><span dir="ltr"><<a href="mailto:ulf@feuerlabs.com" target="_blank">ulf@feuerlabs.com</a>></span><span class="Apple-converted-space"> </span>wrote:<br><blockquote class="gmail_quote" style="margin: 0px 0px 0px 0.8ex; border-left-width: 1px; border-left-color: rgb(204, 204, 204); border-left-style: solid; padding-left: 1ex;"><span class=""><br>On 30 Oct 2014, at 09:07, Scott Lystig Fritchie <<a href="mailto:fritchie@snookles.com">fritchie@snookles.com</a>> wrote:<br><br>> Elsewhere, verifying the good/bad health of the gen_leader protocol.<br>> Its implementations have splintered, so I'm not quite sure which one is<br>> the highest quality today, perhaps this one?  Ulf Wiger and/or Andrew<br></span>> Thompson might also have some opinions …<br><br>I do. It’s probably not the majority opinion, but I’m leaning towards<br>‘locks_leader’ [1] as the best leader-election approach, with the huge<br>proviso that it hasn’t seen much - if any - real action*, as far as I know. ;-)<br></blockquote><div><br></div><div>how would you compare it to raft? Also can we add/remove dynamically nodes which wasn't really possible with gen_leader?</div></div></blockquote><div><br></div><div>Raft does include leader election, but that’s only part of what it does. I assume the Raft leader election algorithm will work correctly even in an Erlang setting, but some differences between Raft and locks:</div><div><br></div><div>1. Raft uses backoff and randomized sleep to resolve election conflicts; locks uses a form of reactive deadlock resolution that converges immediately.</div><div>2. Raft makes use of replication history to elect the most suitable leader. This is difficult for locks, since it will fall back on a global ordering of candidates when needed.</div><div><br></div><div>For fun, I started trying to implement Raft on top of the locks_leader implementation. I got so far as to add a ‘surrender’ operation in locks_leader, so the newly elected leader can decide to make another process the leader. This is where I stopped, waiting for a time where I could do some more careful analysis of the problem space.</div><div><br></div>BR,</div><div>Ulf W</div><br><div apple-content-edited="true">
<span class="Apple-style-span" style="border-collapse: separate; border-spacing: 0px;"><div><div>Ulf Wiger, Co-founder & Developer Advocate, Feuerlabs Inc.</div><div><a href="http://feuerlabs.com">http://feuerlabs.com</a></div></div><div><br></div></span><br class="Apple-interchange-newline">

</div>
<br></body></html>