[{"data":1,"prerenderedAt":201},["ShallowReactive",2],{"project-8202284":3},{"id":4,"name":5,"line":6,"line_source":7,"title":8,"url":9,"domain":10,"maker":11,"posted_at":12,"year":13,"points":14,"comments":15,"rank_in_year":16,"shown_in_year":17,"top":18,"tier":19,"category":20,"subcategory":21,"format":22,"keywords":23,"reception":28,"sentiment":29,"stance_mix":30,"scored_comments":34,"aspects":35,"strip":39,"post_text":42,"what":43,"said":63,"maker_in_thread":127,"shape":129,"grid":134,"attempts":165,"same_week":166,"maker_shows":164,"maker_hidden":194,"reader_version":195,"card":196},"8202284","flake","Decentralized, k-ordered unique IDs in Clojure","title","Show HN: Decentralized, k-ordered unique IDs in Clojure","https:\u002F\u002Fgithub.com\u002Fmaxcountryman\u002Fflake","github.com","llambda",1408542705,2014,53,15,605,2272,27,"notable","languages","id generation library","library",[24,25,26,27],"unique id generator","k-ordered ids","distributed id","clojure","debated",-0.25,{"positive":31,"neutral":31,"mixed":32,"critical":33},2,0,3,7,{"idea":36,"design":37,"execution":38},{"positive":31,"critical":32},{"positive":32,"critical":32},{"positive":32,"critical":33},[40,33,40,32,32,33,32,32,41,32,32,32,41,41,32],5,1,null,{"problem":44,"audience":42,"pricing":42,"motivation":42,"time_to_build":42,"stack":55,"openness":62,"stage":62,"team_size":62},{"value":45,"source":46,"evidence":47},"Generating unique, time-ordered IDs without a central server","commenter",[48,52],{"id":49,"by":50,"text":51},"8204479","dantiberian","That's one reason you'd want this. A few others that I can think of: * No single point of failure if the id server goes down * Avoiding network round trip latency * You have…",{"id":53,"by":50,"text":54},"8205004","Snowflake was 63 bits due to some cleverness with resetting the epoch and coordinating unique worker ID's through Zookeeper. These Flakes relax those restrictions and are 128…",[56],{"value":57,"source":58,"evidence":59},"Clojure","maker",[60],{"id":61},"post","unknown",{"praise":64,"objections":72,"requests":95,"questions":96,"alternatives":101},[65],{"value":66,"source":46,"evidence":67},"Useful decentralized ID approach with no central server",[68,71],{"id":69,"by":50,"text":70},"8204316","Very nice. This is based on Boundary's Erlang Flake ID service, more details of which are at…",{"id":49,"by":50,"text":51},[73,85],{"value":74,"source":46,"evidence":75},"Clock drift or backwards clock can break k-ordering",[76,80,84],{"id":77,"by":78,"text":79},"8204693","dtauzell","What happens if your system clock goes backwards? I think that NTP will not do this by default, but I wonder if it happens for other reasons.",{"id":81,"by":82,"text":83},"8204975","michaelmior","Lots of bad things happen if your clock goes backwards, which is why NTP doesn't do this. Depending on what your system is doing, setting the clock backwards can have serious…",{"id":69,"by":50,"text":70},{"value":86,"source":46,"evidence":87},"MAC addresses are not always unique, so machine uniqueness is not guaranteed",[88,92],{"id":89,"by":90,"text":91},"8204142","VLM","\"So this allows for 2^16-1 unique IDs per millisecond per machine.\" Technically thats per MAC not per machine. I've run into multiple NICs with duplicate MACs as has everyone…",{"id":93,"by":90,"text":94},"8226619","Nobody else responded? Its not supposed to happen and yet it does. Not often. And yes it really confuses ARP.",[],[97],{"value":98,"source":46,"evidence":99},"What happens when the system clock goes backwards?",[100],{"id":77,"by":78,"text":79},[102,110,117],{"value":103,"source":46,"evidence":104},"Twitter Snowflake",[105,109],{"id":106,"by":107,"text":108},"8204475","mumrah","Neat! I made one of these in Java a while back after reading the snowflake Twitter post (which has since been removed). Looks like Twitter has retired Snowflake:…",{"id":53,"by":50,"text":54},{"value":111,"source":46,"evidence":112},"Simpleflake (64-bit)",[113],{"id":114,"by":115,"text":116},"8206172","espeed","Simpleflake is a 64 bit alternative http:\u002F\u002Fengineering.custommade.com\u002Fsimpleflake-distributed-id-generation-for-the-lazy\u002F",{"value":118,"source":46,"evidence":119},"UUIDs",[120,124],{"id":121,"by":122,"text":123},"8204918","swah","Another alternative is using local UUIDs, right ? If you're just interested in generating a unique ID to shard and insert into one of your DB nodes.",{"id":125,"by":82,"text":126},"8204990","UUIDs also don't generally havea notion of ordering.",{"comments":32,"answered":32,"key":128},[],{"commenters":130,"max_depth":131,"maker_replies":32,"first_comment_mins":132,"lifespan_hours":133},9,6,351,142,[135,137,140,141,143,147,149,150,152,154,158,159,161,162,163],[69,32,40,136,50,32],"project\u002Fpositive\u002Fidea",[138,32,33,139,122,32],"8204399","project\u002Fneutral\u002Fidea",[49,32,40,136,50,32],[121,32,32,142,122,32],"other\u002Fneutral\u002Fidea",[144,32,32,145,146,32],"8204942","other\u002Fcritical\u002Fidea","bagels",[53,32,33,148,50,32],"project\u002Fneutral\u002Fdesign",[125,32,32,142,82,32],[151,32,32,142,50,32],"8204991",[89,41,41,153,90,32],"project\u002Fcritical\u002Fexecution",[155,41,32,156,157,32],"8214483","other\u002Fneutral\u002Fnone","ivenhov",[93,41,32,156,90,32],[106,31,32,160,107,32],"other\u002Fpositive\u002Fnone",[77,33,41,153,78,32],[81,33,41,153,82,32],[114,164,32,142,115,32],4,[],[167,172,177,181,186,190],{"id":168,"name":169,"points":170,"category":171},"8187791","GIFyoutube",577,"creative",{"id":173,"name":174,"points":175,"category":176},"8178660","Tuff.gb",260,"games",{"id":178,"name":179,"points":180,"category":20},"8192801","Satellizer",221,{"id":182,"name":183,"points":184,"category":185},"8178940","Ad Detector",204,"security_privacy",{"id":187,"name":188,"points":189,"category":20},"8192287","Scraperjs",192,{"id":191,"name":192,"points":193,"category":20},"8176672","Way.js",162,false,"v2",{"id":197,"name":5,"line":6,"ai":194,"cat":20,"year":13,"points":14,"comments":15,"rec":28,"s":29,"top":18,"kw":198,"maker":11,"domain":10,"tier":19,"attempts":32,"strip":199,"url":9,"mix":200,"praise":66,"objection":74,"sub":21},8202284,[24,25,26,27],"535003001000110",[31,31,32,33],1793990910726]