[{"data":1,"prerenderedAt":395},["ShallowReactive",2],{"project-30992587":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":29,"sentiment":30,"stance_mix":31,"scored_comments":35,"aspects":36,"strip":43,"post_text":45,"what":46,"said":96,"maker_in_thread":203,"shape":215,"grid":220,"attempts":356,"same_week":357,"maker_shows":260,"maker_hidden":388,"reader_version":389,"card":390},"30992587","Multiplayer","Multiplayer Demo Built with Elixir","title","Show HN: Multiplayer Demo Built with Elixir","https:\u002F\u002Fmultiplayer.dev","multiplayer.dev","wenbo",1649700906,2022,221,57,243,2570,10,"notable","infrastructure","realtime messaging server","web_app",[24,25,26,27,28],"realtime","websockets","postgres change data capture","presence","elixir","debated",0.11,{"positive":32,"neutral":33,"mixed":34,"critical":33},12,6,0,24,{"idea":37,"design":39,"docs":41,"performance":42},{"positive":33,"critical":38},1,{"positive":34,"critical":40},3,{"positive":34,"critical":38},{"positive":40,"critical":38},[44,34,34,34,34,34,34,34,34,40,44,44,38,40,44,44,44,34,38,34,38,44,44,34,44,40,40,44,44,40,44,34,38,38,40,34,34,34,38,34],5,"Hey HN, I’m an engineer at Supabase [0] and one of the creators of this demo. My team and I have been working hard to bring developers the next version of Supabase Realtime.\n\nThe current version of Realtime [1] is a Change Data Capture (CDC) server for a PostgreSQL database that broadcasts changes via WebSockets to authorized subscribers. It’s written in Elixir\u002FPhoenix.\n\nThe server utilizes PostgreSQL’s logical replication functionality, which writes database changes to Write-Ahead Logging (WAL) segment files, and a replication slot, responsible for managing and retaining WAL files.\n\nDatabase ",{"problem":47,"audience":56,"pricing":67,"motivation":68,"time_to_build":67,"stack":72,"openness":93,"stage":94,"team_size":95},{"value":48,"source":49,"evidence":50},"Pushing database changes and ephemeral data like cursor positions to connected clients in real time","maker",[51,53],{"id":52},"post",{"id":54,"by":11,"text":55},"30994514","The purpose of this demo is to show off three features of the new Supabase Realtime. - Broadcast: Cursor movements and messages (floating bubbles next to cursors) sent directly…",{"value":57,"source":58,"evidence":59},"Developers building collaborative or realtime web apps","inferred",[60,64],{"id":61,"by":62,"text":63},"30995328","jacquesm","Very interesting, I can see a whole raft of applications for this tech that are outside of the game scene, various collaboration tools use very similar tech under the hood and…",{"id":65,"by":11,"text":66},"30995426","Great observation and exactly how we've envisioned this new Realtime.",null,{"value":69,"source":49,"evidence":70},"Showcase upcoming Supabase Realtime features and gather feedback",[71],{"id":52},[73,77,81,85,89],{"value":74,"source":49,"evidence":75},"Elixir",[76],{"id":52},{"value":78,"source":49,"evidence":79},"Phoenix",[80],{"id":52},{"value":82,"source":49,"evidence":83},"PostgreSQL",[84],{"id":52},{"value":86,"source":49,"evidence":87},"Next.js",[88],{"id":52},{"value":90,"source":49,"evidence":91},"wal2json",[92],{"id":52},"open_source","beta","company",{"praise":97,"objections":114,"requests":147,"questions":176,"alternatives":191},[98,107],{"value":99,"source":100,"evidence":101},"Useful building blocks for collaborative apps, CRDT and Yjs potential","commenter",[102,106],{"id":103,"by":104,"text":105},"30993964","kiwicopple","> CRDTs definitely. it's one of the primary use-cases we had in mind when developing this, and something we've wanted to offer for a long time. I'm happy to see it popping up…",{"id":61,"by":62,"text":63},{"value":108,"source":100,"evidence":109},"Supabase is admired for open source approach",[110],{"id":111,"by":112,"text":113},"30996583","zaking17","I love the direction Supabase is taking; finding the building blocks of modern applications (database, auth, functions, presence, realtime subscriptions), making them easy to…",[115,126,136],{"value":116,"source":100,"evidence":117},"Hard to understand what the demo does and it renders poorly on mobile",[118,122],{"id":119,"by":120,"text":121},"30994307","alberth","Hi wenbo - would you mind explaining a bit more on what the user is suppose to experience in this demo. Maybe I'm the only person confused but I just see people chatting in the…",{"id":123,"by":124,"text":125},"30993910","chrisco255","Nice job, but the demo rendered extremely weird on my mobile device. Some weird jankiness forced half the site off screen. Hard to see what's happening.",{"value":127,"source":100,"evidence":128},"Writing cursor positions to the database would hurt performance",[129,133],{"id":130,"by":131,"text":132},"30994195","kbyatnal","If I understand this correctly, it's basically transmitting database changes over a websocket? If so, how does that work re: performance when it comes to something like live…",{"id":134,"by":104,"text":135},"30994323","This example is built with our refactored Realtime server which solves that issue. (We had a lot of developers trying exactly that, and it ended poorly for their database) The…",{"value":137,"source":100,"evidence":138},"Backend broadcast is less secure than client-to-client WebRTC",[139,143],{"id":140,"by":141,"text":142},"30996784","flippinburgers","Why use a backend heavy broadcast mechanism when you can just use webrtc data channels and communicate directly among users?",{"id":144,"by":145,"text":146},"30996980","hinkley","Well, here are Rules #0-5 of multiplayer games: ``` - Never - Trust - the - Client - Ever. - EVER. ```",[148,158,168],{"value":149,"source":100,"evidence":150},"Open source the SQL for function hooks",[151,152,155],{"id":111,"by":112,"text":113},{"id":153,"by":11,"text":154},"30997377","> finding the building blocks of modern applications (database, auth, functions, presence, realtime subscriptions), making them easy to use, and then sharing the source code.…",{"id":156,"by":11,"text":157},"31007138","Wanted to follow up on this. I spoke to the team and just wanted to re-iterate that we will be open sourcing the SQL very soon.",{"value":159,"source":100,"evidence":160},"Fix local setup instructions, which were hard to run",[161,165],{"id":162,"by":163,"text":164},"30995957","tough","Trying to run the demo I get a blank loading page on my nextjs app ```realtime-realtime-1 | Transport: :websocket realtime-realtime-1 | Serializer:…",{"id":166,"by":11,"text":167},"30997157","Apologies, it's a bit complicated to get the demo server up and running. I'll put together the instructions and link it here.",{"value":169,"source":100,"evidence":170},"Add a Yjs provider for collaborative editing",[171,175],{"id":172,"by":173,"text":174},"30993700","FractalHQ","Oh wow- I’m a huge fan of Supabase and have loved using it in a few Sveltekit projects so far! I gotta ask- how straightforward would it be to power a collaborative code editor…",{"id":103,"by":104,"text":105},[177,187],{"value":178,"source":100,"evidence":179},"How does it scale and perform with many clients?",[180,184],{"id":181,"by":182,"text":183},"30993550","nitinagg","Neat demo. What are the scaling limitations?",{"id":185,"by":11,"text":186},"30995144","For the Change Data Capture functionality, I mentioned that there's a tradeoff between performance and security in another comment…",{"value":188,"source":100,"evidence":189},"Can it power a collaborative code editor?",[190],{"id":172,"by":173,"text":174},[192,196],{"value":193,"source":100,"evidence":194},"WebRTC data channels",[195],{"id":140,"by":141,"text":142},{"value":197,"source":100,"evidence":198},"Meteor",[199],{"id":200,"by":201,"text":202},"30997940","keithnz","sounds like you want \"Meteor\" as it was when it first came out. Which is nearly a decade old now! I really liked it, but the whole community fragmented a while back, not sure…",{"comments":204,"answered":18,"key":205},21,[206,209,212],{"id":207,"text":208},"30994587","Would love to learn more about how you built Internet Fight Club! What were your design decisions and what challenges did you encounter? Also, what do you mean by ETS alone?",{"id":210,"text":211},"30995983","> write-up soon as a guide for Python developers moving to Elixir Awesome initiative! > ETS as a KV\u002Fdocument store to hold user and application state and then reacting to changes…",{"id":213,"text":214},"30997973","This was actually my path. I started working on side projects and picked Elixir because I had my eyes on it for a few years and wanted to give it a shot.",{"commenters":216,"max_depth":217,"maker_replies":204,"first_comment_mins":218,"lifespan_hours":219},27,7,4,25,[221,225,227,230,231,235,236,238,241,243,244,246,249,253,255,257,258,261,263,266,267,270,271,273,275,278,279,281,283,285,287,290,293,295,298,301,303,307,310,313,315,317,322,324,325,326,328,331,334,336,337,340,343,345,348,351,353],[222,34,44,223,224,34],"30993851","maker\u002Fpositive\u002Fidea","Mizza",[207,34,34,226,11,38],"maker\u002Fneutral\u002Fnone",[228,34,34,229,224,34],"30995377","commenter\u002Fneutral\u002Fidea",[210,34,34,229,11,38],[232,34,34,233,234,34],"30997486","commenter\u002Fneutral\u002Fnone","EricMausler",[213,34,34,233,11,38],[237,34,34,233,234,34],"30998538",[239,34,34,233,240,34],"30998739","nesarkvechnep",[242,34,34,233,11,38],"31007109",[200,34,34,229,201,34],[245,34,34,229,240,34],"30998744",[247,34,34,233,248,34],"30995701","yumraj",[250,34,40,251,252,34],"30996671","project\u002Fneutral\u002Fnone","Nezteb",[254,34,34,226,11,38],"30997148",[172,38,44,256,173,34],"project\u002Fpositive\u002Fidea",[103,38,44,256,104,34],[259,260,34,251,11,38],"30993179",2,[119,260,38,262,120,34],"project\u002Fcritical\u002Fdesign",[264,260,40,265,104,34],"30994391","project\u002Fneutral\u002Fdocs",[54,260,34,265,11,38],[268,260,44,256,269,34],"30994543","cupofpython",[111,40,44,256,112,34],[153,40,34,272,11,38],"project\u002Fpositive\u002Fnone",[274,40,44,272,112,34],"30997525",[276,40,34,277,11,38],"30997555","maker\u002Fpositive\u002Fnone",[156,40,34,277,11,38],[162,218,38,280,163,34],"project\u002Fcritical\u002Fdocs",[166,218,34,282,11,38],"maker\u002Fneutral\u002Fdocs",[130,44,38,284,131,34],"project\u002Fcritical\u002Fperformance",[134,44,44,286,104,34],"project\u002Fpositive\u002Fperformance",[288,44,34,289,11,38],"30994351","project\u002Fneutral\u002Fperformance",[291,33,44,272,292,34],"30992632","burggraf",[294,33,34,233,11,38],"30995332",[296,33,34,233,297,34],"30995507","abc3erl",[299,217,44,272,300,34],"30998709","httgp",[302,217,34,282,11,38],"31007154",[304,305,40,289,306,34],"30993431",8,"seanwilson",[308,305,40,289,309,34],"30993548","michelpp",[311,305,44,286,312,34],"30993755","chasers",[314,305,34,289,11,38],"30994062",[316,305,44,286,104,34],"30994237",[318,319,40,320,321,34],"30994836",9,"project\u002Fneutral\u002Fidea","Kinrany",[323,319,34,223,11,38],"30995271",[61,18,44,256,62,34],[65,18,34,223,11,38],[123,327,38,262,124,34],11,[329,327,34,330,11,38],"30994101","maker\u002Fneutral\u002Fdesign",[332,32,38,262,333,34],"30998546","astroz87",[181,335,40,289,182,34],13,[185,335,34,289,11,38],[338,335,34,339,62,34],"30995306","commenter\u002Fneutral\u002Fperformance",[341,335,34,342,145,34],"30997101","other\u002Fneutral\u002Fnone",[344,335,34,226,11,38],"30997247",[346,335,34,347,145,34],"31006194","other\u002Fneutral\u002Fperformance",[140,349,38,350,141,34],14,"project\u002Fcritical\u002Fidea",[144,349,34,352,145,34],"commenter\u002Fcritical\u002Fprivacy",[354,349,34,355,11,38],"30997213","maker\u002Fneutral\u002Fidea",[],[358,363,368,373,378,383],{"id":359,"name":360,"points":361,"category":362},"30946792","Redditle.com",448,"web_saas",{"id":364,"name":365,"points":366,"category":367},"30970911","Explordle",390,"learning_science",{"id":369,"name":370,"points":371,"category":372},"30956775","Eight Colors",368,"games",{"id":374,"name":375,"points":376,"category":377},"31002171","indieblog.page",241,"productivity",{"id":379,"name":380,"points":381,"category":382},"30991235","howto-wasm-minimal",217,"dev_tools",{"id":384,"name":385,"points":386,"category":387},"31013326","Half Loaf Near Me",196,"consumer_social",false,"v2",{"id":391,"name":5,"line":6,"ai":388,"cat":20,"year":13,"points":14,"comments":15,"rec":29,"s":30,"top":18,"kw":392,"maker":11,"domain":10,"tier":19,"attempts":34,"strip":393,"url":9,"mix":394,"praise":99,"objection":116,"sub":21},30992587,[24,25,26,27,28],"5000000003551355501015505335535011300010",[32,33,34,33],1794036619091]