7 ms·
I used to encourage back-end web developers to write a web server from scratch as a learning exercise. With HTTP 1.1 it was actually pretty easy to write one in
by staplung 6y ago
I used to encourage back-end web developers to write a web server from scratch as a learning exercise. With HTTP 1.1 it was actually pretty easy to write one in C (plus berkeley sockets); the idea being that you learn a lot about how things actually work at the lowest level without spending an inordinate amount of time. It's not really practical with HTTP 2 anymore but in any case, having done my own exercise I had no idea about many of these quirks.
- smoldesu 6y agohttps://doc.rust-lang.org/book/ch20-00-final-project-a-web-server.html https://doc.rust-lang.org/book/ch20-00-final-project-a-web-s... The Rust Book has an awesome "final project" where it walks you through building a multi-threaded web server. If you're a battle-hardened C/C++ dev looking for an inroad to Rust, this is a great place to start.
- cosmodisk 6y agoNever touched Rust but having skimmed through this, looks like a fantastic tutorial.
- steveklabnik 6y agoThank you!
- cmehdy 6y agoSeems like you are the author of the book. Just wanted to say that this book makes me want to pick up Rust even though I have no specific goal for it, because the book is appealing in writing and appearance, layout and illustrations, ideas and execution.. basically good job and thank you!
- steveklabnik 6y agoOne of two authors. I’ll share this with my co-author, thanks a ton :)
- smoldesu 6y agoI'm also here to worship your work! The Rust book is one of my favorite documentations around, and just the other day I sent it to a colleague who was interested in learning Rust. Even though he only had experience in Typescript and Java, he made a working chess engine less than three days later.
- carols10cents 6y agoOther co-author here, that's great to hear!!
- carols10cents 6y agoI'm the other co-author, thank you for sharing this! It means a lot to me <3
- mleonhard 6y agoI also enjoyed the Rust Book. Thanks so much for the effort you and your co-author put into the book. And thank you for your contributions to the Rust language and tooling. I learned Rust over the difficult last year. It brings me some joy and satisfaction.
- carols10cents 6y agoGlad you like the book and Rust!! <3
- jventura 6y agoI teach web development and distributed systems in a local university, and one of my lab exercises is building an HTTP/1.0 Server in Python with sockets. I do have a blog post [1] that shows how to do it if someone's interested.. [1] https://joaoventura.net/blog/2017/python-webserver/ https://joaoventura.net/blog/2017/python-webserver/