How Notion Cut Latency by 20%

แชร์
ฝัง
  • เผยแพร่เมื่อ 23 พ.ย. 2024

ความคิดเห็น • 236

  • @NeetCodeIO
    @NeetCodeIO  2 หลายเดือนก่อน +59

    Honestly, had a lot of fun making this one. How'd you like it and do you wanna see more?
    Written version: neetcode.io/newsletter

    • @SatinderSingh71
      @SatinderSingh71 2 หลายเดือนก่อน +2

      Finally what we have all been waiting for. Neetdesign 🎉

    • @frozenmen93
      @frozenmen93 2 หลายเดือนก่อน +1

      Sure NeetCode. I really like the way you explain everything :)

    • @adilansari-hq9ge
      @adilansari-hq9ge 2 หลายเดือนก่อน +1

      yes , watched the video twice. its pure Gold. Need more and more videos.

    • @camelCig
      @camelCig 2 หลายเดือนก่อน

      For sure!

    • @Ansh77K
      @Ansh77K 2 หลายเดือนก่อน

      Yep really like this style of content, primeagen and t3gg theo are some of my favourite types specially as a beginner

  • @maid768
    @maid768 2 หลายเดือนก่อน +158

    To be honest, I immediately liked the video just by reading the title and without even watching the video. I was like "finally something new and not even new but also really interesting topic". Would like more of those kind of videos in the future, thank you

  • @ashishnagar
    @ashishnagar 2 หลายเดือนก่อน +100

    I love it.. the format, the video length, the topics coverage and of course the hands-on explanation. Looking forward to this series.

  • @nikitaproit
    @nikitaproit 25 วันที่ผ่านมา +1

    In fact, the implementation of leader election is needed even without the use of web workers. And many browsers do not have a shared worker. You can use a broadcast channel, "active tab" events, and local storage to elect a leader. And make sure that all requests to the server come only from the leading tab. Especially in the case of sockets, this reduces the load on the server hundreds of times -- people have a habit of not closing tabs -- in collaborative web application. And sometimes there can be several "read leaders" if you have 2+ active tabs/monitors at the same time.

  • @ashutoshbondre6325
    @ashutoshbondre6325 2 หลายเดือนก่อน +16

    Great great video! I have stumbled upon the "How Notion Cut Latency" posts on Linkedin multiple times previously, but the textual material always seemed too heavy or contained too much jargon to comprehend easily without losing patience. This video format & someone explaining as we go - is SOOO SOO much better! Please keep doing this. There's a lot of DSA content on TH-cam but almost no content such as this video. This could also be NeetCode's near future niche.

  • @austenmoore7326
    @austenmoore7326 2 หลายเดือนก่อน +23

    Great video. I loved the visuals and 10-20 minutes is the sweet spot for optimal length imo

    • @JagaSantagostino
      @JagaSantagostino 2 หลายเดือนก่อน

      Agreed, sweet spot that makes you watch it now, instead of saving it for later (and forget about it)

  • @jthepj108
    @jthepj108 2 หลายเดือนก่อน +5

    Graphics make all the complex concepts you cover super approachable. More 20-minute videos please!
    This was excellent. You covered all the important points concisely and only cut out details that can be found in the newsletter.
    I would suggest a TLDR of some kind at the start.

  • @capability-snob
    @capability-snob 2 หลายเดือนก่อน +3

    The cause of your website performance problems is database latency. Over the last 20 years, this has consistently been true for every system I've had to maintain. It's extra funny when they have gone to the effort to rice, using whatever meme language everyone is claiming to be fastest. Reducing the query count has taken operations from minutes to microseconds, and I keep having this experience every time I change teams.

    • @notsojharedtroll23
      @notsojharedtroll23 หลายเดือนก่อน

      Checks out to me. No matter how much flashy a software piece is, you will be limited by your hardware, and something that strictly enters disk manipulation for read & write (aka the DB) makes sense that will drastically slow your app

  • @bananasmileclub5528
    @bananasmileclub5528 2 หลายเดือนก่อน +1

    Feedbacks:
    1- pictures are really good. I think you should keep it. It really helped visually internalizing some of concepts or design approaches.
    2- The time was all right. For more complicated videos it makes sense to go longer.
    3- Tying the content of the current video with entry level/beginner stuff (for eg ACID compliance at the end) is really good. That helped unveiling more of the complexity of what is happening.
    4- I was originally not happy with the flow of the video (moving from subparts of the videos) but after reflecting I think it was fine
    Thank you for going that deep in the details of what exactly is happening and what is going wrong. That is what sets your system design video apart from the other content on TH-cam. Excited about where this is going.

  • @codingdens
    @codingdens หลายเดือนก่อน

    I love the way you explain. Definitely keep the visuals. Everytime i think wth he is talking about you immediately goes to basics of it and i really like this aspect of your explaining complex problems/designs. Thank you for providing such value on TH-cam.

  • @davidapps
    @davidapps 14 วันที่ผ่านมา

    I watched the whole video, I think the length is appropriate for the depth, thank you!
    I'd love to know how Notion does, or how you would, implement the sqlite part.

  • @chief1337x
    @chief1337x 2 หลายเดือนก่อน +4

    I usually dont comment on the videos, but this made me comment because of your effort you put in the video creating it! Amazing video dude! I really liked the flow of the video and everything else.

    • @NeetCodeIO
      @NeetCodeIO  2 หลายเดือนก่อน +1

      appreciate it 🙏🙏

  • @LC789789
    @LC789789 หลายเดือนก่อน

    This was super helpful and incredible video. I love learning about these kinds of stories since it mimics what engineers actually do on the job. It's also something I've wondered a lot myself!

  • @Luis-Torres
    @Luis-Torres 2 หลายเดือนก่อน +5

    Visuals are great. Lengthy videos are also nice, I'm not here for dopamine, I'm here for education. Keep up the good work man! 🙂

  • @alexgoico402
    @alexgoico402 หลายเดือนก่อน

    One thing to note is this only improves the write queuing performance (which is fine as it's the bottleneck) as sqlite does not support concurrent writers as stated in the "when to use" docs: "SQLite only supports one writer at a time per database file. But in most cases, a write transaction only takes milliseconds and so multiple writers can simply take turns. SQLite will handle more write concurrency than many people suspect. Nevertheless, client/server database systems, because they have a long-running server process at hand to coordinate access, can usually handle far more write concurrency than SQLite ever will."

  • @ericm97
    @ericm97 27 วันที่ผ่านมา

    Loved this. Please make more of this system design / optimisation type video!

  • @AliMalik-yt5ex
    @AliMalik-yt5ex 2 หลายเดือนก่อน +1

    Yes! Visuals are fantastic, especially for breaking down abstract concepts. Love this initiative.

  • @itdepends5906
    @itdepends5906 27 วันที่ผ่านมา

    You are f$$king fantastic. The depth vs breadth covered is amazingly on point. You point out the gotchas (e.g. SQLite is ACID compliant - so how come...?) which a lot of videos don't (creating a 'perfect system where everything just works' illusion). Your scribbling is even nice - does highlight and help my brain hold on to key concepts while it's dynamic enough that I don't lose focus. Overall, just keep killing it, man

  • @tinrab
    @tinrab 2 หลายเดือนก่อน +5

    One interesting thing about this is OPFS. I've never actually used it before.

  • @quicklearningdeveloppement5948
    @quicklearningdeveloppement5948 2 หลายเดือนก่อน +2

    great content i loved it but by the way at 11:35 i wanna say that basically threads share the same memory but processes don't , this is why processes they have to communicate through channels

    • @NeetCodeIO
      @NeetCodeIO  2 หลายเดือนก่อน +1

      ah good catch, in this case i believe while web workers run in a separate thread, from a programming perspective to me it still feels like they communicate with the main js thread the way different processes would communicate with each other.
      this is such a subtle point tho so someone please correct me if im wrong

  • @aaronprice5235
    @aaronprice5235 2 หลายเดือนก่อน +4

    There is so much entry level stuff posted for tech in general its hard to find good sources for Mid + level development.
    This is huge.

  • @Joel-iz6zr
    @Joel-iz6zr 2 หลายเดือนก่อน +1

    The visuals were awesome, I made sure to subscribe to the newsletter!

  • @Anushkumar-lq6hv
    @Anushkumar-lq6hv 2 หลายเดือนก่อน

    I loved all the visuals and the explanations. I would prefer if these videos were 15 to 20 mins and not longer. The blog post can provide additional details.
    Also, this was one the best explanations I have seen to date.

  • @Qrzychu92
    @Qrzychu92 2 หลายเดือนก่อน

    the browser file API being the problem reminds of a talk by a database creator. He said that many people assume that if you write bytes to disk, and then immediately read them back, you get the same thing.
    Turns out that when you are creating a database, that's not "true enough" - from time to time the SSD or HDD gets corrupted, and you have take that into accound.

  • @ArchesNP
    @ArchesNP 2 หลายเดือนก่อน

    Very cool video. Liked those hand-on explanation. The way you actually showed application tab, it's memory usage and the js file with log statements. Pls continue your good work. Looking forward to learn more from you!

  • @liorgoell
    @liorgoell 2 หลายเดือนก่อน

    Naive Question: does Notion solve for race between tabs?
    I.e. let’s say you have two tabs open on the same task but they are in two different states.
    one is newer - let’s say 2 paragraphs in the task description
    One with staler data.
    Focus is on the tab with the new data, and now you move to the old tab, add one char to your stale description and navigate to a different task.
    Will you lose your paragraphs ? (I don’t use notion… but intrigued)

  • @gspivan
    @gspivan 2 หลายเดือนก่อน

    Great video! I admire how you simplify complex concepts, making them easy to understand.

  • @business_central
    @business_central 2 หลายเดือนก่อน +1

    Loved the visuals loved the explanation and drawings.
    For the video, if anything I would love more depth. I feel that's what's mainly missing in all of TH-cam. Totally in for much longer videos or series where you fully cover a concept in high level and actual code/tech level. Hope to see that!
    For the newsletter I want to read it, but wonder can we only read it in the emails ? nowhere else? Just like to read in light mode or reading mode of some browsers if possible.

  • @jazzymichael
    @jazzymichael 2 หลายเดือนก่อน

    Nice thumbnail. The dark and faded blue looks really good against the black background, very easy to read.

  • @akhilbisht798
    @akhilbisht798 2 หลายเดือนก่อน

    I love this format so much new things to learn. Would definetly love more of these.

  • @ivoredafe9660
    @ivoredafe9660 2 หลายเดือนก่อน

    I love the video and the explanation and the detail and everything. You genuinely want your viewers to learn these things and it shows. Thanks

  • @bholmesdev
    @bholmesdev 2 หลายเดือนก่อน

    This video hit me at the perfect time. That shared web worker strategy is a surprise to me. Might save some bugs in my own code!

  • @mikejakusz1493
    @mikejakusz1493 2 หลายเดือนก่อน

    Awesome awesome video! Thank you for taking the time to draw and give a great explanation of their system, I found it really helped and connected all the pieces together! You are the GOAT. I love these types of videos. Keep up the great work!

  • @ghunther0111
    @ghunther0111 2 หลายเดือนก่อน

    Liked the diagram pictures used & the length of the video was nice, I learned that this was possible from this video & knowing the pitfalls like the OPFS causing data corruption will save a lot of headaches I imagine.

  • @VidyaB-c1h
    @VidyaB-c1h 2 หลายเดือนก่อน

    Awesome !!! The details, the code and yes the pictures - very very useful ... I have also signed up for your newsletter. Your leetcode videos are gold standard, and so was this.

  • @marikmarik4601
    @marikmarik4601 2 หลายเดือนก่อน

    Man, you are so good in explaining things. Thank you for your hard work!

  • @shaunfurtado7368
    @shaunfurtado7368 2 หลายเดือนก่อน

    Honestly, Everything about your content, the way you share is just awesome for understanding. Looking forward for even more of these content.

  • @hirashiki.rafael
    @hirashiki.rafael หลายเดือนก่อน

    love the content.
    really interesting to see a breakdown of optimization of a platform I use and a bunch of other people

  • @hrshlgunjal-1627
    @hrshlgunjal-1627 2 หลายเดือนก่อน

    Loved the pictures. Explaination was amazing as well. And yup 20 minutes is ideal. Thanks for making this newsletter.

  • @jayantchhillar4227
    @jayantchhillar4227 2 หลายเดือนก่อน

    I rarely put comments on videos. But have to say, this is good. Length is good. Content is non-generic. Learnt something that might come handy someday

  • @omi_khan4901
    @omi_khan4901 2 หลายเดือนก่อน

    loved the video, it's perfect. Concise and letting me know the things possible as opposed to exactly how to do it.

  • @jaceyang3375
    @jaceyang3375 2 หลายเดือนก่อน

    Clean explanation. Need more high quality content like this. Good job my man🎉

  • @sahilnenwani6528
    @sahilnenwani6528 2 หลายเดือนก่อน

    Loved your way of explaining up the things, 19 minutes totaly worth to watch

  • @ismbks
    @ismbks 2 หลายเดือนก่อน +4

    sqlite is possibly the best piece of software written in the 21th century

  • @bisdak5761
    @bisdak5761 2 หลายเดือนก่อน

    loved videos that shows drawing to explain the process and thought on how its done, please do more like this! thanks

  • @satyasanjay1339
    @satyasanjay1339 2 หลายเดือนก่อน

    Visuals are key to understanding any topic much faster and better. So, add more if necessary.

  • @dmc_xenon2411
    @dmc_xenon2411 2 หลายเดือนก่อน

    Love the content! Keep the visuals coming. they make things much easier to understand.

  • @AnhNguyen-ro3iz
    @AnhNguyen-ro3iz 2 หลายเดือนก่อน

    This is awesome! I like the length of your video, your explanation and thought are clear as always! Please keep making these!

  • @NeoMekhar
    @NeoMekhar 2 หลายเดือนก่อน

    Awsome video, awsome topic as well. I wanted to learn more about using sqlite for caching, particularly now with WASM tools like the sqlite-vec extension for vector search!! This was great!
    Visuals were great!

  • @knkootbaoat6759
    @knkootbaoat6759 2 หลายเดือนก่อน

    the visuals are good. obviously could always be better but i dont have further feedback on how. for the vid length could definitely cut it a bit.
    Thanks as always

  • @codygao8323
    @codygao8323 2 หลายเดือนก่อน +1

    Great video as usual, i love your explanation and diagrams! Keep up the good work, THANKS

  • @michelle_tsai_drums
    @michelle_tsai_drums 2 หลายเดือนก่อน

    Love the vid! Visuals help a lot, thanks for taking the time to draw them!

  • @StellasAdi18
    @StellasAdi18 2 หลายเดือนก่อน

    Love this. Love your channel and most importantly way you explain things. Even for folks with 10+ yoe, it’s so useful.

  • @ahmadbasyouni9173
    @ahmadbasyouni9173 2 หลายเดือนก่อน +1

    This is so good keep doing it please ur the only person i can listen to talk

  • @sumoinbush
    @sumoinbush 2 หลายเดือนก่อน

    Keep the style! This works really well and I understood everything. Thank you

  • @Nuzrd84
    @Nuzrd84 2 หลายเดือนก่อน +1

    Everything is good 📈😊, honestly It makes me stick to the video to the end.
    You should add the visuals like these to persuade the System design and very informative video BTW,
    I hope like me everyone expect this like understandable and knowledgeable video from you in the future .
    Thank you.

  • @DeathSugar
    @DeathSugar 2 หลายเดือนก่อน +1

    Dunno about cutting latency, but they did a lot if shite to make notion slow right after initial release. I remember how at first I was pretty happy how it was snappy as hell, but when our teams started to fill more documents it become slower. And then they've released a new update with new features and everything turned into a turtle - everything was slow as hell. Including simple selection and opening context menu.

  • @DA5H
    @DA5H 2 หลายเดือนก่อน +10

    Can't wait to study this, but shouldn't you be posting this on the main channel?

    • @owo4202
      @owo4202 2 หลายเดือนก่อน +2

      My guess is: His main account probably maxed subscribers in cs job market, so opening another channel would bring more exposure and double income.

  • @pollathajeeva23
    @pollathajeeva23 2 หลายเดือนก่อน

    Great job, man! I will check out your newsletter. Thanks!

  • @techstudio7331
    @techstudio7331 2 หลายเดือนก่อน

    This was extremely awesome and kept my attention intact and curiosity raised, drawing and images way of explanation is better (atleast for e) than rambling while showing up bunch of text. Thankyou so much.
    Btw might be a naive question, how do you get to know about news as such ? what are your sources?

  • @kikisbytes
    @kikisbytes 2 หลายเดือนก่อน

    Love the thorough run through and easy explanation!

  • @jmms49
    @jmms49 2 หลายเดือนก่อน +1

    Cool video! I think the shared worker is called "service worker"?
    BTW, you forgot to link the newsletter in the description

  • @AnandaKrishna-t3h
    @AnandaKrishna-t3h 2 หลายเดือนก่อน

    Very refreshing video, between leetcode problem solving videos.
    looking forward to see more system design lecture , Thank you.

  • @cse9003
    @cse9003 หลายเดือนก่อน

    never had someone taught me this clean, you are the best thanks

  • @yuri.caetano
    @yuri.caetano 2 หลายเดือนก่อน

    Hi nav, I really enjoied a lot your video. I'm mind of tech lead in the places I work. We are doing aí stuff.
    And it's very good to me to see how others experts are solving their problems

  • @hapaise2924
    @hapaise2924 2 หลายเดือนก่อน

    loved the video with the details , images and everyhting. it was soo clear and eays to understand, lots of knowledge as well!

  • @colineckert
    @colineckert 2 หลายเดือนก่อน

    great video! love the visuals, length, and overall format 👍

  • @osoggy
    @osoggy 2 หลายเดือนก่อน

    That was 20 minutes??? Time flys when you are having fun. The exact issue I’m writing thru too rn. Love it give me 14 more

  • @ashishalex10
    @ashishalex10 2 หลายเดือนก่อน

    learnt something within 5 mins of the video. Quality content, thank you !

  • @ayzack2361
    @ayzack2361 2 หลายเดือนก่อน

    I really like this video! I like the visuals, the length is perfect.

  • @slai2389
    @slai2389 2 หลายเดือนก่อน

    Excellent video, looking forward to have more like this. Really need some practical system design knowledge. Thanks for your videos as always

  • @Akash-hx9mn
    @Akash-hx9mn 15 วันที่ผ่านมา

    The visuals were awesome, Keep up the good work, THANKS

  • @guitarhero69
    @guitarhero69 2 หลายเดือนก่อน

    sick video. with a hands on explanation it was easy for a novice like me to understand it. i need moreeee

  • @TonyHoabc
    @TonyHoabc 2 หลายเดือนก่อน

    I like the coding, it really adds to the typical system design videos.

  • @warrenhenning8064
    @warrenhenning8064 2 หลายเดือนก่อน

    Love stuff like this. Signed up for the newsletter.

  • @Nxck2440
    @Nxck2440 2 หลายเดือนก่อน

    I have a software interview tomorrow. Watching this to see if I can learn some system design lingo to trick them into thinking I know stuff.

  • @felixx2012
    @felixx2012 2 หลายเดือนก่อน

    Love seeing these system design videos, keep it up (but also keep up leetcode questions, I'm still unemployed)

  • @yusufnurwahid898
    @yusufnurwahid898 2 หลายเดือนก่อน

    Great video man!!! Keep up the good work!!!
    I really enjoy the explanation...

  • @rida_brahim
    @rida_brahim 2 หลายเดือนก่อน

    Keep doing these videos, i learned a lot from this. Also this just made me realize than as a self taught sometimes you can invent your own solutions to overcome programming problems like workarounds same as what notion did with race requests etc

  • @kirillfedtsov
    @kirillfedtsov 2 หลายเดือนก่อน +2

    "Latency is bad but you know what is worse..." I was totally expecting a sponsor plug there 😅

  • @hstivggfghyhgfg8359
    @hstivggfghyhgfg8359 2 หลายเดือนก่อน +1

    There is a key-value database like Firestore built into the browser (IndexedDB) without any limits. I guess Notion team's wants to write SQL

  • @xdaniels13
    @xdaniels13 2 หลายเดือนก่อน

    Great video, good length and details enough to be awesome watch and educational keep it up

  • @worldfacts4fun
    @worldfacts4fun 2 หลายเดือนก่อน

    your effort is worth it coz i watched the whole video till the end, your narrations visuals everything is top notch. Liked and subscribed

  • @biradon4444
    @biradon4444 2 หลายเดือนก่อน

    The visual is amazing, keep doing it 🔥

  • @sjtgs
    @sjtgs 2 หลายเดือนก่อน

    I love the video . I love the practical aspect. Kudos to you ....

  • @BROOKnim
    @BROOKnim 2 หลายเดือนก่อน

    Great video man! If you do get time make more videos on these concepts, atleast for things in you newsletter that you fell are video worthy!
    Again, great video man!

  • @fareedjaved5986
    @fareedjaved5986 2 หลายเดือนก่อน

    Great deep dive. I appreciate the visuals.

  • @Danielo515
    @Danielo515 2 หลายเดือนก่อน +5

    OPFS allows you to write TB of dstaz it's not exclusive of SQLITE

    • @alexgoico402
      @alexgoico402 หลายเดือนก่อน

      This deserves more likes.

  • @stryhx
    @stryhx 2 หลายเดือนก่อน

    need some more videos like this my man!!!!!! keep up the good work!

  • @adityaanuragi6916
    @adityaanuragi6916 2 หลายเดือนก่อน

    Loved the video, I like how you explained system design
    Often with bytebytego (which I do like) I do feel a little stumped at times
    Also if I understand correctly we are literally having a database on the client side?!? That seems wild, but why didn't they just use indexedDB

  • @pistleninja
    @pistleninja 2 หลายเดือนก่อน

    Love the Length. Love the pictures. Just subbed.

  • @andreydenisov1451
    @andreydenisov1451 หลายเดือนก่อน

    Nice video with pretty good illustrations. Thanks mate

  • @DNKF
    @DNKF 2 หลายเดือนก่อน

    Please do more videos like this! Please don't leave daily Leetcode problems too =] These 2x are "must have" to interview.

  • @kng1433-g4x
    @kng1433-g4x 2 หลายเดือนก่อน

    I actually prefer Informative videos and 'Hour-long-videos' actually doesn't matter to me yk, I'd like if you produce such contents as I really feel your ability to explain is pretty neat.
    Oh and also, really nice and informative visuals I really appreciate it.

  • @kooravid-hd8586
    @kooravid-hd8586 2 หลายเดือนก่อน

    Great video you should keep the images and cover more details on each topic.

  • @UIEngineering101
    @UIEngineering101 2 หลายเดือนก่อน

    what prompted Notion team to use SQLite instead of SQL-like storage already available in the browser called indexDB?

  • @satyamjha68
    @satyamjha68 2 หลายเดือนก่อน

    Do more of these videos plz!! Joined your newsletter!

  • @raizdesamauma8607
    @raizdesamauma8607 หลายเดือนก่อน

    Great video and super clear explanations, thanks a lot!

  • @emonymph6911
    @emonymph6911 2 หลายเดือนก่อน

    Pictures and diagrams are a requirement. Rather than creating your own you can use some icon library and grab what you need. Boring standards is better than flashy when learning, it's more important that everyone is on the same page.

  • @michaelevans4139
    @michaelevans4139 2 หลายเดือนก่อน

    This is fire ! Keep more of these coming !