BYUBRIGHAM YOUNG UNIVERSITY
Computer Science
CS 360 Internet Programming
Archive

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. 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 semaphores 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 gain the confidence and ability to quickly learn a new language, by exposing them to a variety of languages used for Internet programming, including C, Python, PHP and 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, PHP, and 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:

Recommended Books

  • Unix Network Programming, Volume 1: The Sockets Network API, 3rd Edition, by W. Richard Stevens, Bill Fenner, and Andrew M. Rudoff.

    This has been the definitive reference for network programming for more than a decade, and has been recently updated. I will provide all of the necessary information in the lectures, but if you want a reference on socket programming, this is a great book to buy and one you will use for many years if you do socket programming. In addition to sockets, this book covers threads, concurrent architectures, and a ton of other network programming details.

  • Programming Ruby: The Pragmatic Programmer's Guide, Third Edition, by Dave Thomas, with Chad Fowler and Andy Hunt, Pragmatic Programmers, May 2008, ISBN: 978-1-9343560-8-1.

    This is a great book to buy if you don't know Ruby yet.

  • 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, Pragmatic Programmers, Dec 2006, ISBN: 978-0-9776166-3-3

    This is the best book to buy for learning Ruby on Rails.

Optional Books

  • Computer Networking: A Top-Down Approach Featuring the Internet, fourth edition, by James F. Kurose and Keith W. Ross, Addison Wesley, 2007, ISBN 0-321-49770-8.

    This is a general networking textbook, covering the entire network stack from application layer down to the link layer. If you want to have a textbook that explains how the Internet works, this is the one to buy. We will only use a small part of this book in this class, but you should buy this book if you intend to take CS 460 since it is required for that class.

  • 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 some of my lecture material on the Internet, HTTP, web proxies, web server architectures, and web workload characterization from this book.

  • Practical C Programming, 3rd Edition, by Steve Oualline, O'Reilly & Associates, August 1997, ISBN 1-56592-306-5.
  • A very good C reference.

  • 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

    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 onlinePython documentation.

  • 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.
  • If you have never done any PHP or MySQL programming, this is a great book to learn this topic. It is one of the best in the area.

Assignments and Grading Policy

The assignments for this class will consist of labs and exams. Labs must be written in the assigned language and must compile and run on the department's Linux machines.

Labs will be graded by the TA or instructor. For some labs, the scoring will be based on running your code. In these cases, we will publish a grading sheet before each assignment is due, listing the tests we will run and how many points each test is worth. For other labs, the scoring will be based on a report you write. For these labs, the assignment will indicate how the report will be scored.

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:

Labs70%
Exams30%

Late Policy

Labs are due on the day indicated. To accommodate difficulties in your schedule, each student has a budget of 7 free late days. You may use these late days for any of the labs; Sundays and university holidays do not count against you. No labs will be accepted unless they are turned in on time or you have enough late days remaining in your budget. 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 university's last day of instruction.

Collaboration Policy

Most assignments for this class must be done individually. You are encouraged to discuss solving the labs and any programming problems you encounter generally, but you must write your own code and should not view any other student's code. When producing written work, your writing must be your own thoughts. Your 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 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.

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.

Policy on Harassment

Harassment of any kind is inappropriate at BYU. Specifically, BYU's policy against sexual harassment extends not only to employees of the university but to students as well. If you encounter sexual harassment, gender-based discrimination, or other inappropriate behavior, please talk to your professor, contact the Equal Employment Office at 422-5895 or 367-5689, or contact the Honor Code Office at 422-2847.

Students with Disabilities

BYU is committed to providing reasonable accommodation to qualified persons with disabilities. If you have any disability that may adversely affect your success in this course, please contact the University Accessibility Center at 422-2767. Services deemed appropriate will be coordinated with the student and instructor by that office.