[{"data":1,"prerenderedAt":260},["ShallowReactive",2],{"project-16199382":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":41,"post_text":44,"what":45,"said":59,"maker_in_thread":156,"shape":165,"grid":169,"attempts":222,"same_week":223,"maker_shows":31,"maker_hidden":252,"reader_version":253,"card":254},"16199382","bplustree","On-disk B+ tree for Python 3","title","Show HN: On-disk B+ tree for Python 3","https:\u002F\u002Fgithub.com\u002FNicolasLM\u002Fbplustree","github.com","nicolaslem",1516561115,2018,159,21,246,2155,12,"notable","data","embedded key-value storage","library",[24,25,26,27],"b+tree","python","on-disk storage","key-value store","curious",-0.035,{"positive":31,"neutral":32,"mixed":31,"critical":33},1,4,2,8,{"performance":36,"execution":38,"docs":39,"idea":40},{"positive":37,"critical":37},0,{"positive":31,"critical":31},{"positive":37,"critical":31},{"positive":37,"critical":37},[37,42,37,43,37,42,37,31,37,42,37,31,37,37,37,42,42,37,37,37,37],3,5,null,{"problem":46,"audience":44,"pricing":44,"motivation":44,"time_to_build":44,"stack":52,"openness":57,"stage":58,"team_size":57},{"value":47,"source":48,"evidence":49},"Provides an on-disk B+ tree for Python storage","maker",[50],{"id":51},"post",[53],{"value":54,"source":48,"evidence":55},"Python 3",[56],{"id":51},"unknown","prototype",{"praise":60,"objections":69,"requests":99,"questions":110,"alternatives":129},[61],{"value":62,"source":63,"evidence":64},"Code is clean and uses type annotations","commenter",[65],{"id":66,"by":67,"text":68},"16200787","sprt","The code looks very clean. Uses type annotations too. Wish there were more comments though.",[70,80,86,93],{"value":71,"source":48,"evidence":72},"Delete not implemented yet (work in progress on remove branch)",[73,77],{"id":74,"by":75,"text":76},"16199546","antman","Cannot delete items yet",{"id":78,"by":11,"text":79},"16199660","Yes, it's a work in progress, see the `remove` branch.",{"value":81,"source":48,"evidence":82},"Likely an order of magnitude slower than LMDB; CPU intensive object creation",[83],{"id":84,"by":11,"text":85},"16199734","I haven't done any benchmark yet but I expect my implementation to be at least an order of magnitude slower. I've found my implementation to be CPU intensive: creating Python…",{"value":87,"source":63,"evidence":88},"Overflow pages are not collected, so file can grow without bounds",[89],{"id":90,"by":91,"text":92},"16201626","coleifer","Why is this not mentioned very clearly in the README? Seems like willful misrepresentation. You might also mention that, if replacing large values that use overflow pages, the…",{"value":94,"source":48,"evidence":95},"Serialization is too complicated",[96],{"id":97,"by":11,"text":98},"16207363","Thank you. I know what you mean, I'm not happy with how the serialization is done right now, it's too complicated. Maybe someone on HN knows a Python serialization library beyond…",[100,106],{"value":101,"source":63,"evidence":102},"Document serialization formats and WAL with diagrams",[103],{"id":104,"by":91,"text":105},"16201565","This is pretty cool. As I was reading the code I really wished for an explanation or simple ASCII diagram of the serialization formats for the various node\u002Frecord types, as well…",{"value":107,"source":63,"evidence":108},"More code comments",[109],{"id":66,"by":67,"text":68},[111,118,125],{"value":112,"source":63,"evidence":113},"How does it compare to LMDB?",[114],{"id":115,"by":116,"text":117},"16199678","dimatura","Nice, I'm a big user of various data stores for scientific work. How does this compare to LMDB (http:\u002F\u002Fwww.lmdb.tech\u002Fdoc\u002F), which uses B-trees (and has a Python interface)?",{"value":119,"source":63,"evidence":120},"How does it perform compared to sqlite3?",[121],{"id":122,"by":123,"text":124},"16202842","erezsh","How does this perform compared to sqlite3? And and can you use keys that aren't builtin values?",{"value":126,"source":63,"evidence":127},"Can non-builtin keys be used?",[128],{"id":122,"by":123,"text":124},[130,137,145,149],{"value":131,"source":63,"evidence":132},"ZODB BTrees package",[133],{"id":134,"by":135,"text":136},"16200473","laurencerowe","ZODB has a mature B+Tree implementation for on disk use in the BTrees package. https:\u002F\u002Fpypi.python.org\u002Fpypi\u002FBTrees",{"value":138,"source":63,"evidence":139},"LMDB",[140,141],{"id":115,"by":116,"text":117},{"id":142,"by":143,"text":144},"16199682","halayli","What's wrong with LMDB?",{"value":146,"source":63,"evidence":147},"SQLite",[148],{"id":122,"by":123,"text":124},{"value":150,"source":63,"evidence":151},"Durus",[152],{"id":153,"by":154,"text":155},"16200988","shalabhc","Check out zodb and durus.",{"comments":43,"answered":33,"key":157},[158,159,162],{"id":84,"text":85},{"id":160,"text":161},"16207306","Thank you! I found that type annotations make code easier to read so I tend to write less comments. But I'll make an effort.",{"id":163,"text":164},"16207323","It is possible to use your own key if it has a natural order and you write your own simple serializer: https:\u002F\u002Fgithub.com\u002FNicolasLM\u002Fbplustree\u002Fblob\u002Fmaster\u002Fbplustree\u002Fserializer.py",{"commenters":166,"max_depth":32,"maker_replies":43,"first_comment_mins":167,"lifespan_hours":168},15,38,25,[170,172,174,176,178,180,181,182,184,186,190,194,196,199,203,207,212,214,216,219,220],[134,37,37,171,135,37],"other\u002Fneutral\u002Fnone",[115,31,42,173,116,37],"project\u002Fneutral\u002Fperformance",[84,31,37,175,11,31],"project\u002Fcritical\u002Fperformance",[66,33,43,177,67,37],"project\u002Fpositive\u002Fexecution",[160,33,37,179,11,31],"maker\u002Fneutral\u002Fdocs",[122,42,42,173,123,37],[163,42,37,179,11,31],[74,32,31,183,75,37],"project\u002Fcritical\u002Fexecution",[78,32,37,185,11,31],"maker\u002Fneutral\u002Fexecution",[187,32,42,188,189,37],"16199686","maker\u002Fneutral\u002Fnone","IvyMike",[191,32,37,192,193,37],"16199698","commenter\u002Fneutral\u002Fnone","liopleurodon",[90,32,31,195,91,37],"project\u002Fcritical\u002Fdocs",[197,43,37,171,198,37],"16201583","j_s",[200,43,37,201,202,37],"16202489","other\u002Fneutral\u002Fperformance","bufferoverflow",[204,205,37,171,206,37],"16200461",6,"zerokernel",[208,209,42,210,211,37],"16201907",7,"project\u002Fneutral\u002Fidea","evolighting",[104,34,42,213,91,37],"project\u002Fmixed\u002Fdocs",[97,34,37,215,11,31],"maker\u002Fneutral\u002Fdesign",[217,218,37,171,91,37],"16200764",9,[153,218,37,171,154,37],[142,221,37,171,143,37],10,[],[224,229,234,238,243,247],{"id":225,"name":226,"points":227,"category":228},"16216960","eliotand.me",644,"web_saas",{"id":230,"name":231,"points":232,"category":233},"16223929","RetroClip",309,"creative",{"id":235,"name":236,"points":237,"category":233},"16211516","Paper Programs",235,{"id":239,"name":240,"points":241,"category":242},"16212689","Crypto News Agency",183,"finance_crypto",{"id":244,"name":245,"points":246,"category":242},"16225383","PonziCoin",182,{"id":248,"name":249,"points":250,"category":251},"16197808","surviv.io",163,"games",false,"v2",{"id":255,"name":5,"line":6,"ai":252,"cat":20,"year":13,"points":14,"comments":15,"rec":28,"s":256,"top":18,"kw":257,"maker":11,"domain":10,"tier":19,"attempts":37,"strip":258,"url":9,"mix":259,"praise":62,"objection":71,"sub":21},16199382,-0.04,[24,25,26,27],"030503010301000330000",[31,32,31,33],1794036562723]