Building an HTTP Server in Rust: Exploring TCP/IP, Socket Programming, and Asynchronous I/O
Вставка
- Опубліковано 26 тра 2023
- In this video, we dive into the world of Rust programming and embark on a thrilling adventure of building an HTTP Server from scratch. Join us as we explore the intricacies of TCP/IP, Socket Programming, and Asynchronous I/O.
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!
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
Dayum you really started the channel with a bang, lot of effort into production and content.
Thanks for watching! Next video is going to be about neural networks and machine learning in rust from complete scratch.
i don't find the link for the code in description xD
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.
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.
@@codemoons Thank you for your perspective! Hopefully one day you'll make a video about writing a library crate for an API in Rust.
Good for new rustaceans! Subscribed👋
Keep going bro, I think you will have a bright future
Subbed , your amazing!
Great video
Good content, this one in particular could have a repository showing this example of yours.
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?
Really nice upload video !
Just a suggestion
Please add the source code reference in the description of your video, it may be helpfull
Good thing you blurred out PHub. Good content keep it up.
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"
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.
@@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. 😁
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
Source Code ?
Subscribing for the future. Content looks good and I Reay want to learn RUST so.....
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
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.
Is there the source code in the description
i don't know how perl works either but have no desire to spend my life reading the source code
github.com/codemoonsxyz/neural-net-rs
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?
wrong link bruh
"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.
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.
It's ideal if they want to actually become masters.
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
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.
Maybe go for less style and more substance next time. I have experience using Rust for network programming but the way you copy-paste large blocks of code and then rapidly move on made your explanations in the coding sections nearly incomprehensible at times even for me.
Good advice! Wanted to strike a balance between entertainment and education heavy.
not deep enough
Yea, still experimenting with how technical the videos should be.
@@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.