Syllabus
Course Description and Goals
This course covers Internet programming in depth, including client-server, peer-to-peer, and web applications. The primary goal of the course is to help students understand the principles of how distributed applications are built, while also giving them practical experience in creating common Internet applications. An important theme of the course is demonstrating that the Internet can provide many of the same services we have traditionally received from a desktop operating system, including access to applications, file systems, computing resources, and databases. Additional goals for this course include:
- Give students experience designing a variety of Internet applications, including client-server, peer-to-peer, and web applications.
- Introduce students to concurrent programming models that are used for building scalable servers, including an emphasis on synchronization of threads and processes using both sempahores and message passing.
- Provide students with experience developing an experimental methodology, including workload generation, experiment design, and choice of performance metrics. Give students experience conducting an in-depth performance evaluation of their code to better understand design tradeoffs and operating system overhead.
- Help students understand web programming concepts, including database connectivity, security, and identity. Expose students to both traditional page-driven and asynchronous web application frameworks.
- Expose students to basic basic relational database concepts used in web programming, including structuring data and making queries.
- Help students prepare for future programming careers by exposing them to a variety of languages used for Internet programming, including C, Python and PHP or Ruby on Rails.
To meet the goals of the course, students will complete lab assignments and several exams. The exams will consist primarily of written questions that ask the students to apply the principles of Internet programming to a given problem.
Lab assignments will be designed to provide practical experience in creating a variety of Internet applications. Students will also conduct extensive performance evaluation of their applications to find limitations and better understand design tradeoffs. An important theme of the labs will be their organization around the Internet and the web. Applications will be written in C, Python, and PHP/Ruby and will include:
- a basic web server: Help students understand basic client-server programming, demonstrate how to follow a spec to implement a protocol. Students will implement much of the 1.0 specification of HTTP, including conditional get and cookies.
- a concurrent web server: Help students understand the principles and advantages of concurrent programming using threads. Students will modify their web server so that it can use a pool of threads, with semaphores to synchronize access to shared memory.
- performance evaluation: Help students understand experimental methodology, workload generation, and performance evaluation. Students will conduct an extensive performance evaluation of their web server to demonstrate the performance improvement gained by using threads.
- a peer-to-peer web browser: Help students understand peer-to-peer programming and learn how to build their own distributed system. Students will create a web client that uses peer-to-peer file sharing to download a file when their web server is overloaded. Clients will coordinate their actions through a shared server, similar to a BitTorrent tracker. Students will re-use their performance testing framework from the previous assignment to demonstrate the scalability of their system.
- a web application: Help students develop a database-driven web application of their choice. Students will begin by writing a design document for their application. Once the design is approved, the students will build the application using their choice of PHP or Rails, with a MySQL backend. The application must keep track of user accounts and keep track of user state, such as a shopping cart, email, or todo list.
Textbooks
For the lecture material, I will draw from various books and online materials. Where possible, I will provide links to online materials. Since there is no good and comprehensive book for this class, I will not require you to buy one. Instead, I will list a set of good books and you are welcome to buy any you think you may need:
-
Web Protocols and Practice: HTTP/1.1, Networking Protocols, Caching, and Traffic Measurement,
1st Edition, by Balachander Krishnamurthy and Jennifer Rexford,
Addison Wesley Professional, 2001, ISBN 0201710889.
This is a good book on HTTP and web caching, but has too narrow a focus to serve as a general textbook for the class. I will get much of my lecture material on the Internet, HTTP, web proxies, web server architectures, and web workload characterization from this book. If you feel uncomfortable taking the class without a textbook, then you should buy this book.
-
Unix Network Programming, Volume 1: The Sockets Network API, 3rd Edition,
by W. Richard Stevens, Bill Fenner, and Andrew M. Rudoff.
This is the classic network programming book, recently updated. If you need a socket programming reference, this is the top book to purchase. It covers sockets, threads, concrurrent architectures, and a ton of other network programming details.
- Practical C Programming, 3rd Edition, by Steve Oualline, O'Reilly & Associates, August 1997, ISBN 1-56592-306-5.
-
Practical C++ Programming, 2nd Edition,
by Steve Oualline, O'Reilly & Associates, December
2002, ISBN 0-596-00419-2.
A very good C++ reference.
- Dive Into Python and How to Think Like a Computer Scientist: Learning with Python
- Web Database Applications with PHP, and MySQL, 2nd Edition, by Hugh E. Williams and David Lane, O'Reilly & Associates, May 2004, ISBN 0-596-00543-1.
-
Programming Ruby: The Pragmatic Programmer's Guide, Second Edition,
by Dave Thomas, with Chad Fowler and Andy Hunt, Pragmattic Programmers.
If you already know PHP and have done some PHP and MySQL programming, then you may prefer to learn Ruby and Ruby on Rails. This is the definitive Ruby book.
-
Agile Web Development with Rails, Second Edition,
by Dave Thomas and David Heinemeier Hansson with Leon Breedt, Mike
Clark, James Duncan Davidson, Justin Gehtland, and Andreas Schwarz,
Pragmattic Programmers.
If you are going to do Ruby on Rails development, this is the best resource to get.
A very good C reference.
We will use Python for scripting some performance evaluations and processing and graphing data, so you can use any scripting language you prefer. I can give you the most help if you use Python, but you may use Perl or Ruby if you prefer. For Python, I suggest you learn the language by reading these two online books. You should also use the online Python documentation.
If you have never done any PHP or MySQL programming, you should do your assignments in PHP for this class and you should buy this book. It is one of the best in the area.
Assignments and Grading Policy
The assignments for this class will consist of labs and exams.
Most assignments for this class must be done individually. You are encouraged to generally discuss problems with other students, but you may never use some other student's solution or code in any way. The use of sources (ideas, quotations, paraphrases) must be properly acknowledged and documented.
Group work is permitted only where specified clearly in the assignment. Group work is meant to be done jointly with a team of two or three students. Students in a group should work on problems and programs together, and each student should perform a roughly equal amount of work. When you turn in group work, turn in a single copy, with each group member signing his or her name. By signing your name, you are attesting that you have invested an equal amount of time in the assignment.
Labs must be written in the assigned language and must compile and run on the department's Linux machines. Labs will be graded according to a survey and scored by the TA or instructor. The survey will be released before each assignment is due, indicating how many points each part of the assignment is worth.
Grading for exams will be on a scale of 0 to 10 for each problem, with a final score based on the total possible points. A score of 10 indicates your answer is completely correct (A), and a score of 5 indicates your answer is entirely wrong but you made a reasonable effort (E). Grades in between indicate very good (9), good (8), adequate (7), and poor (6). Failure to make a reasonable effort to answer a question scores a 0.
Your final grade will be computed by weighting all scores as follows:
| Labs | 60% |
| Exams | 40% |
Labs are due on the date specified in the class schedule. You may turn in labs late, but each late week incurs a 10% penalty per week. Exceptions can only be made for a medical or strong personal excuse. You may always turn in partial work if you are not finished and you will be graded on what you have accomplished. No work can be turned in after the last day of class.
Educational Policies
Honor Code Standards
In keeping with the principles of the BYU Honor Code, students are expected to be honest in all of their academic work. Academic honesty means, most fundamentally, that any work you present as your own must in fact be your own work and not that of another. Violations of this principle may result in a failing grade in the course and additional disciplinary action by the university.
Preventing Sexual Discrimination or Harassment
Sexual discrimination or harassment (including student-to-student harassment) is prohibited both by the law and by Brigham Young University policy. If you feel you are being subjected to sexual discrimination or harassment, please bring your concerns to the professor. Alternatively, you may lodge a complaint with the Equal Employment Office (D-240C ASB, 422-5895, eeo@byu.edu) or with the Honor Code Office (4440 WSC, 422-2847, hco@byu.edu)
Students with Disabilities
If you have a disability that may affect your performance in this course, you should get in touch with the office of University Accessibility Center (1520 WSC, 422-2767, uac@byu.edu). This office can evaluate your disability and assist the professor in arranging for reasonable accommodations.
