<html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class="">Hi all,<div class=""><br class=""></div><div class="">I’ve heard about Erlang for a long time, but finally had reason to try it.</div><div class=""><br class=""></div><div class="">So I used it to prototype a simple model of Que Sera Consensus (QSC), a new experimental asynchronous consensus algorithm.  I was impressed to discover that the complete, working algorithm - though just running on a single machine for now - is expressible in only about 37 code lines as counted by CLOC, not counting test code.  Erlang’s selective receive feature, in particular, seems to have been presciently designed three decades ago just to implement the Threshold Logical Clocks (TLC) communication primitive that QSC builds on.</div><div class=""><br class=""></div><div class="">If anyone feels like poking at it, helping to find any flaws, or building more realistic cross-node implementations and experimenting with it in real distributed applications, the code lives here:</div><div class=""><br class=""></div><div class=""><span class="Apple-tab-span" style="white-space:pre">     </span><a href="https://github.com/dedis/tlc/tree/master/erlang/model" class="">https://github.com/dedis/tlc/tree/master/erlang/model</a></div><div class=""><br class=""></div><div class="">I’d be happy to hear any feedback or experiences, either privately, on this list, or via the above GitHub repo.  Is it comprehensible?  Can you break it?  Can you find a competitively small and simple implementation of, say, Paxos or Raft or any other comparable consensus algorithm in Erlang?</div><div class=""><br class=""></div><div class="">For background, the actual algorithms are described in this preprint:</div><div class=""><br class=""></div><div class=""><span class="Apple-tab-span" style="white-space:pre">    </span>Que Sera Consensus: Simple Asynchronous Agreement with Private Coins and Threshold Logical Clocks</div><div class=""><span class="Apple-tab-span" style="white-space:pre">    </span><a href="https://arxiv.org/abs/2003.02291" class="">https://arxiv.org/abs/2003.02291</a></div><div class=""><br class=""></div><div class="">Enjoy.  And by the way, nice language. :)</div><div class=""><br class=""></div><div class="">Cheers</div><div class="">Bryan</div><div class=""><br class=""></div></body></html>