[{"data":1,"prerenderedAt":305},["ShallowReactive",2],{"project-24432939":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":35,"aspects":36,"strip":42,"post_text":44,"what":45,"said":93,"maker_in_thread":187,"shape":198,"grid":201,"attempts":266,"same_week":267,"maker_shows":41,"maker_hidden":297,"reader_version":298,"card":299},"24432939","Sequence","An open-source financial ledger API written in Clojure","title","Show HN: An open-source financial ledger API written in Clojure","https:\u002F\u002Fgithub.com\u002Fdecimals\u002Fsequence","github.com","andriosr",1599749928,2020,125,33,504,3028,17,"notable","finance_crypto","ledger api","api",[21,24,25,26,27],"double-entry accounting","clojure","dynamodb","open source ledger","mixed",0.153,{"positive":31,"neutral":32,"mixed":33,"critical":34},4,7,1,3,15,{"design":37,"idea":39,"execution":40},{"positive":38,"critical":34},0,{"positive":33,"critical":38},{"positive":41,"critical":38},2,[38,34,38,38,38,38,38,34,38,43,38,43,38,33,38,43,34,33,33,34,34,38,38,38,38,34,38,38,34,34,38,38,43],5,null,{"problem":46,"audience":56,"pricing":44,"motivation":60,"time_to_build":44,"stack":64,"openness":90,"stage":91,"team_size":92},{"value":47,"source":48,"evidence":49},"Scalable, available double-entry ledger for fintech companies","maker",[50,53],{"id":51,"by":11,"text":52},"24432951","Hi everyone, I have been iterating a startup since the start of the year. And I'm using Clojure for everything I do. The first product was a ledger service, but it ended up not…",{"id":54,"by":11,"text":55},"24434392","I wrote a piece that touches a bit on the why: https:\u002F\u002Fdecimals.substack.com\u002Fp\u002Fthings-i-wish-i-knew-before-building But in a nutshell: availability and scalability. Yes you can…",{"value":57,"source":48,"evidence":58},"Companies struggling with ledger systems at scale",[59],{"id":51,"by":11,"text":52},{"value":61,"source":48,"evidence":62},"Startup pivoted away from managed ledger service and open-sourced the ledger project",[63],{"id":51,"by":11,"text":52},[65,69,79],{"value":66,"source":48,"evidence":67},"Clojure",[68],{"id":51,"by":11,"text":52},{"value":70,"source":48,"evidence":71},"DynamoDB",[72,75],{"id":73,"by":11,"text":74},"24434757","It maintains double-entry consistency of balances with DynamoDB. I uses DynamoDB (or any No-SQL) conditional puts. You can think of it as a update + where of SQL databases. But…",{"id":76,"by":77,"text":78},"24433902","kondro","It uses DynamoDB and transactions. Each double-entry appears to be 4 items, 1 for each balance update and 1 for each transaction. Each “journal” will use 2x4 WCU for the write to…",{"value":80,"source":81,"evidence":82},"MD5 hashes for transaction ids","commenter",[83,87],{"id":84,"by":85,"text":86},"24438132","elcritch","Nice clean code! Thanks for open sourcing. I was a bit hoping to see how you were calculating amortization\u002Finterest charges in Clojure, but it appears to be only a pure ledger.…",{"id":88,"by":11,"text":89},"24438423","Thanks! I have interesting ideas for amortization\u002Finterests, maybe they can get added at some point. Yes, the hashes are the ids used for Avoiding double-spending along with…","open_source","launched","unknown",{"praise":94,"objections":111,"requests":138,"questions":157,"alternatives":173},[95,107],{"value":96,"source":81,"evidence":97},"Clean, well-written code",[98,99,103],{"id":84,"by":85,"text":86},{"id":100,"by":101,"text":102},"24452661","didiercrunch2","Amazing work there. I have looked at your code and it is very nice. Fun thing, I am currently building a similar ledger in clojure. The task is much harder then expected. My…",{"id":104,"by":105,"text":106},"24434371","lelo_tp","Nice work! Very well done",{"value":108,"source":81,"evidence":109},"Detailed review of DynamoDB design praised",[110],{"id":76,"by":77,"text":78},[112,127,134],{"value":113,"source":81,"evidence":114},"Using NoSQL\u002FDynamoDB for a ledger questioned as not truly relational",[115,119,123],{"id":116,"by":117,"text":118},"24434116","bmh100","Why did you go with a non-relational database?",{"id":120,"by":121,"text":122},"24435111","nagyf","DynamoDB is a key-value store. Key-value stores are not relational databases [1] The link you posted is a really good resource for someone who wants to start using DynamoDB…",{"id":124,"by":125,"text":126},"24436882","outworlder","That's really stretching the definition of a 'relational database'. You can create relationships on flat text files. It doesn't mean that you have a relational database now.",{"value":128,"source":81,"evidence":129},"Eventual consistency and double-entry integrity concerns",[130],{"id":131,"by":132,"text":133},"24433724","weitzj","I was wondering as well. How does that work with eventual consistency? Shouldn’t there be double bookkeeping so you don’t generate money out of the air?",{"value":135,"source":81,"evidence":136},"Limited partition size from LSI design and single-transaction model",[137],{"id":76,"by":77,"text":78},[139,146,151],{"value":140,"source":81,"evidence":141},"Support for multiple databases via adapters (Postgres, leveldb)",[142],{"id":143,"by":144,"text":145},"24435775","zrail","Is DynamoDB baked into the product or could new adapters be written to use different key\u002Fvalue stores? Things like leveldb for local-only ledgers or even an adapter on top of…",{"value":147,"source":81,"evidence":148},"Interest and amortization calculations",[149,150],{"id":84,"by":85,"text":86},{"id":100,"by":101,"text":102},{"value":152,"source":81,"evidence":153},"Idempotent requests with request ids",[154],{"id":155,"by":132,"text":156},"24433803","Also it seems like the amount is of type number. Ideally you would calculate in Dollarcents or Eurocents (I.e. solely use integers) like 100 Eurocents equal 1€ So you do not have…",[158,166],{"value":159,"source":81,"evidence":160},"Why a non-relational database was chosen",[161,162],{"id":116,"by":117,"text":118},{"id":163,"by":164,"text":165},"24433682","jsmith99","Why use nosql for a ledger?",{"value":167,"source":81,"evidence":168},"Whether floating-point amounts are allowed",[169],{"id":170,"by":171,"text":172},"24434878","tappio","Does it allow to save values with floating point imprecision such as 1.000000001? I don't think the issue is never in the database but the service that uses the API to send…",[174,180],{"value":175,"source":48,"evidence":176},"Ledger CLI",[177],{"id":178,"by":11,"text":179},"24437331","You're right. Sequence is a ledger API. These tools will give you higher abstractions on top of their internal ledgers. I think you are on the right track. If you want something…",{"value":181,"source":81,"evidence":182},"GnuCash and Frappe Books",[183],{"id":184,"by":185,"text":186},"24436621","smcnally","Sequence has interesting applications for longer-term work I'm on, and\u002Fbut I'm Baader-Meinhoffing [0] re more-immediate small-biz accounting ledger needs: I spent a good chunk of…",{"comments":188,"answered":189,"key":190},14,6,[191,192,195],{"id":51,"text":52},{"id":193,"text":194},"24434793","Interesting question. No-SQL doesn't mean non-relational. DynamoDB is a relational database. It's up to you on how you design the table to accommodate your relations. This is a…",{"id":196,"text":197},"24435324","You're right. DynamoDB is not a relational database. But data in DynamoDB can be relational just as in a regular relational database:…",{"commenters":199,"max_depth":189,"maker_replies":188,"first_comment_mins":33,"lifespan_hours":200},16,101,[202,204,206,207,209,210,211,215,217,218,220,222,223,226,229,232,233,234,235,236,238,239,242,244,246,247,248,250,253,256,258,261,262],[51,38,38,203,11,33],"project\u002Fpositive\u002Fidea",[116,38,34,205,117,38],"project\u002Fneutral\u002Fdesign",[193,38,38,205,11,33],[120,38,38,208,121,38],"commenter\u002Fneutral\u002Fnone",[196,38,38,208,11,33],[124,38,38,208,125,38],[212,38,38,213,214,38],"24436303","other\u002Fcritical\u002Fnone","Scarbutt",[184,38,34,216,185,38],"project\u002Fneutral\u002Fidea",[178,38,38,208,11,33],[84,38,43,219,85,38],"project\u002Fpositive\u002Fexecution",[88,38,38,221,11,33],"maker\u002Fneutral\u002Fexecution",[100,33,43,203,101,38],[224,33,38,225,11,33],"24453577","maker\u002Fpositive\u002Fidea",[227,33,33,228,101,38],"24454242","project\u002Fcritical\u002Fdesign",[230,33,38,231,11,33],"24474254","commenter\u002Fneutral\u002Fdesign",[104,41,43,219,105,38],[163,34,34,205,164,38],[131,34,33,228,132,38],[155,34,33,228,132,38],[237,34,34,205,77,38],"24433917",[170,34,34,205,171,38],[240,34,38,241,11,33],"24435153","project\u002Fpositive\u002Fdesign",[243,34,38,208,77,38],"24435342",[245,34,38,241,11,33],"24435148",[73,34,38,205,11,33],[143,34,34,216,144,38],[249,34,38,225,11,33],"24436821",[251,34,38,252,11,33],"24438031","maker\u002Fpositive\u002Fnone",[254,34,34,205,255,38],"24433829","hn_throwaway_99",[76,34,34,257,77,38],"project\u002Fmixed\u002Fdesign",[259,34,38,260,11,33],"24434344","maker\u002Fneutral\u002Fdesign",[54,34,38,205,11,33],[263,31,43,264,265,38],"24433698","project\u002Fpositive\u002Fnone","mikejulietbravo",[],[268,273,278,283,288,293],{"id":269,"name":270,"points":271,"category":272},"24442294","Octo",241,"infrastructure",{"id":274,"name":275,"points":276,"category":277},"24428206","Eiten",201,"web_saas",{"id":279,"name":280,"points":281,"category":282},"24493248","Cortex license plate reader",190,"ai",{"id":284,"name":285,"points":286,"category":287},"24485447","jazzit",162,"dev_tools",{"id":289,"name":290,"points":291,"category":292},"24476641","Lofimusic.app",136,"consumer_social",{"id":294,"name":295,"points":296,"category":292},"24478149","Lag",129,false,"v2",{"id":300,"name":5,"line":6,"ai":297,"cat":20,"year":13,"points":14,"comments":15,"rec":28,"s":301,"top":18,"kw":302,"maker":11,"domain":10,"tier":19,"attempts":38,"strip":303,"url":9,"mix":304,"praise":96,"objection":113,"sub":21},24432939,0.15,[21,24,25,26,27],"030000030505010531133000030033005",[31,32,33,34],1793991015869]