Building an HTTP Server in Rust: Exploring TCP/IP, Socket Programming, and Asynchronous I/O

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

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

  • @kshitijmohan3992
    @kshitijmohan3992 ปีที่แล้ว +42

    The “i have no idea how this works” really flames my imposter syndrome, and no matter how good I am as a programmer, it always makes me feel less than. The only way to counter this feeling is to go ahead a learn how this works. I think this video is a manifestation of that feeling and i am really glad you uploaded this!

    • @saltyowl3229
      @saltyowl3229 11 หลายเดือนก่อน +1

      There’s a better way to counter that IF you are conscious of it and aware of possible issues. Chances are you were curious about whatever it is at one point, and someone who didn’t feel like taking the time to properly explain the concept at a deeper level gave you a very surface level, someone else’s library documentation sorta understanding. Most of the time that person isn’t yourself, and people giving these half descriptions of things do genuinely cause issues by doing so. Be mad about that, be upset that we don’t live in a society more accommodating to natural human curiosity.
      But if you can get imposter syndrome over something, chances are it’s because you are curious; you feel like you SHOULD know it. If that’s the case you aren’t an imposter, but have merely been forced through a situation wherein you could not learn about it. Be mad at that situation, not at yourself. Be SPITEFUL that anyone EVER believed it was better for you not to learn something. It’ll fuel you to learn it well should you be doing so out of spite.
      Great trick, works well for me, just gotta be conscious if it was really any particular person’s fault, or unfortunate circumstance they were forced into alongside you. Don’t hate the player, hate the game, sorta mindset. Getting personally angry at others for something so unintentional just isn’t productive, or good

  • @gautamprikshit1
    @gautamprikshit1 ปีที่แล้ว +18

    Dayum you really started the channel with a bang, lot of effort into production and content.

    • @codemoons
      @codemoons  ปีที่แล้ว +6

      Thanks for watching! Next video is going to be about neural networks and machine learning in rust from complete scratch.

  • @oghenemarho5694
    @oghenemarho5694 ปีที่แล้ว +4

    Amazing content! I have always wondered how servers worked under the hood in Rust. This also shows the amount of work it takes to make a robust server framework which needs to be appreciated more especially as most are open-source.

    • @codemoons
      @codemoons  ปีที่แล้ว +3

      Yea Definitely the open source community needs more appreciation. After I made this project I was thinking about how many different exploits and security vulnerabilities would work on this server. Open source community does all that work for free.

    • @oghenemarho5694
      @oghenemarho5694 ปีที่แล้ว

      @@codemoons Thank you for your perspective! Hopefully one day you'll make a video about writing a library crate for an API in Rust.

  • @theshlok
    @theshlok ปีที่แล้ว +1

    Good for new rustaceans! Subscribed👋

  • @abisarwan20
    @abisarwan20 ปีที่แล้ว +8

    i don't find the link for the code in description xD

  • @3boody738
    @3boody738 ปีที่แล้ว

    Keep going bro, I think you will have a bright future

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

    Around 2:59 you mentioned that when there's no more data to process you close the connection but what if you want to return a response back to the client don't you have to keep it open?

  • @Bry-f2m
    @Bry-f2m 9 หลายเดือนก่อน

    Great video

  • @thekwoka4707
    @thekwoka4707 ปีที่แล้ว +2

    Wow, solid video.
    Good overview and demonstration.
    I think it can be helpful to clarify on your coding examples which stuff is "this is what we are doing to demo stuff" vs "this is really what is actually part of hiw the thing is implemented"

  • @chida-san
    @chida-san ปีที่แล้ว

    Good content, this one in particular could have a repository showing this example of yours.

  • @symbioticparasite6268
    @symbioticparasite6268 ปีที่แล้ว

    Subbed , your amazing!

  • @alpaslaneldemir6904
    @alpaslaneldemir6904 ปีที่แล้ว

    Good thing you blurred out PHub. Good content keep it up.

  • @barratech
    @barratech ปีที่แล้ว +1

    Really nice upload video !
    Just a suggestion
    Please add the source code reference in the description of your video, it may be helpfull

  • @jubiaj2672
    @jubiaj2672 ปีที่แล้ว +2

    Nice video. I would appreciate it if you could go more a bit into depth about the OSI model and how that connect to Rust

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

    Hello. Thanks for the video. Where can I find the source code to test it out?

  • @oussaber
    @oussaber ปีที่แล้ว +1

    great video, thanks for sharing! but filming yourself writing it would've been heaps better imo. also can you share the code with us ? I would love to take a look at it, and learn from it

    • @codemoons
      @codemoons  ปีที่แล้ว

      github.com/codemoonsxyz/neural-net-rs , Here you go! Thanks for the feedback! I need to find a way to film it without it being boring.

  • @_DRACrY
    @_DRACrY ปีที่แล้ว +1

    Subscribing for the future. Content looks good and I Reay want to learn RUST so.....

  • @verified_tinker1818
    @verified_tinker1818 ปีที่แล้ว

    I've been waiting for something like this!
    Could you make a video about parsing the buffer into a custom data structure? I looked at your source doe, but you used the `httparse` crate, which seems to do the heavy lifting.

    • @verified_tinker1818
      @verified_tinker1818 ปีที่แล้ว

      @@codemoons I once tried to write a little TCP multiplayer server with Tokio and struggled with parsing the buffer into a custom message. It got confusing and I gave up and wrote it in Elixir, but it always bothered me that I couldn't do it. So, I'd love a tutorial on that. 😁

  • @wamcroberts
    @wamcroberts ปีที่แล้ว +3

    Source Code ?

  • @Exodus9874
    @Exodus9874 ปีที่แล้ว

    Is there the source code in the description

  • @TonKcedua
    @TonKcedua ปีที่แล้ว +2

    "Every builder must know their tools."
    Every builder must know _how_ _to_ _use_ their tools _effectively_ - they don't have to know the exact chemical composition of those tools. I don't mean to say that this kind of learning isn't worthwhile, but especially in _very_ large codebases, sometimes this kind of learning - especially during a dayjob - just isn't realistic.

    • @codemoons
      @codemoons  ปีที่แล้ว

      Yea you're right. However the foundations I think we should know. For example if you are in cyber sec you should know the ins and outs of networking very well.

    • @thekwoka4707
      @thekwoka4707 ปีที่แล้ว

      It's ideal if they want to actually become masters.

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

    i don't know how perl works either but have no desire to spend my life reading the source code

  • @FixIt42
    @FixIt42 ปีที่แล้ว +2

    I thought this project was short enough to at least show and quick explain all the code. This did not give me anything. Disappointed! Why talk quick about a few bits when there is so much more. I did actually start typing. I found this on github when googling so now I know how much more there is!! :( More input in my comment below

    • @codemoons
      @codemoons  ปีที่แล้ว +1

      Great Advice. I'm still new with creating programming content so I wasn't sure how in depth to go with it. I will definitely keep this in mind for next time. great critique.

  • @codemoons
    @codemoons  ปีที่แล้ว

    github.com/codemoonsxyz/neural-net-rs

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

      I mean first of all thank you for video but I think this source code is related to your second video not this one. Or am I wrong?

  • @strelkan
    @strelkan ปีที่แล้ว +1

    not deep enough

    • @codemoons
      @codemoons  ปีที่แล้ว

      Yea, still experimenting with how technical the videos should be.

    • @FixIt42
      @FixIt42 ปีที่แล้ว +1

      @@codemoons Everything but complete is useless for this kind of thing. You have to decide if you want to explain http servers or show of a rust project (without a code deep dive) or make a programming tutorial. This is none of these and too tiny parts of all to be useful. I should have seen where it was hearing with the long explaination of osi being cut in half. I would have liked a full programming tut.