This is the material that we had planned to teach for this class. It is likely that because of the COVID-19 campus closure, we will need to adjust throughout the quarter, and we won’t follow this plan exactly. This is also the first time we are teaching this class, so we are actively seeking your feedback. If there is something you are excited for, or if there is a topic you’ve heard about that doesn’t appear here, or if there is something that does appear here that you aren’t thrilled about, let us know! We want to make this as exciting and useful as possible for you.
Memory safety and Rust basics
- What is memory safety? Why is it an issue in C and C++?
- Rust’s memory model: ownership, lifetimes, references
- RAII in C++, and how it compares to Rust
How do you architect good code?
- Pitfalls of
- Enums in Rust
- Different approaches to abstraction: traits vs object-oriented programming
Avoiding multiprocessing pitfalls
- Managing pipes: How do we avoid resource leaks?
- Signal handling: Why is it so hard to get right? How can we do better?
Avoiding multithreading pitfalls
- Revisiting memory safety in the context of threads
- How can we use Rust’s memory model to prevent race conditions? Where might it not save you?
- Mutexes, arc pointers, semaphores, condition variables
- Message passing as an alternative to traditional shared memory
Putting this all into practice: Networked systems
- Handling and sending HTTP requests
- Implementing a threaded server
- Load balancing, failure handling in distributed systems
- Nonblocking I/O; async/await and futures in Rust
These projects are tentative.
Simple debugger: Have you ever wondered how GDB works under the hood? You’ll use multiprocessing skills you’ve acquired from CS 110 and CS 110L to implement a simple version of your own!
High-performance server: Speed is important! Amazon found that a 0.1s increase in latency reduced sales by 1%, and Google found that an 0.4s increase in latency reduced searches by 0.7%. In this project, you’ll use a variety of techniques from CS 110 and CS 110L to build a fast but robust web server.