Golang News http://golangnews.com Jobs, Code, Videos and News for Go hackers - everything about the go programming language Thu, 22 Jun 2017 20:00:00 +0000 A comparison of unique ids in Go #uuid <div> <p>The requirement of non-coordinated generation of unique ids comes up often in distributed systems.&nbsp;A simple solution is to generate a random id. If you give it 16 bytes of randomness, the chances of generating the same random number are non-existent.</p></div> <p>See also several <a href="https://firebase.googleblog.com/2015/02/the-2120-ways-to-ensure-unique_68.html">uuid</a> <a href="https://blog.twitter.com/engineering/en_us/a/2010/announcing-snowflake.html">articles</a> linked at the end, and the <a href="https://blog.kowalczyk.info/tools/generate-unique-id">demo page</a> with all the algorithms demonstrated.</p> 4 points posted by kenny https://blog.kowalczyk.info/article/JyRZ/generating-good-random-and-unique-ids-in-go.html 2336 Thu, 22 Jun 2017 14:47:00 +0000