Lecture Notes and Further Information

  1. Introduction ( handout and overhead presentation).

  2. The client-server model ( handout and overhead presentation). We learn about the client-server model at the base of all the network applications. This matter is also covered in Chapter 2 of the textbook.

  3. Concurrency ( handout and overhead presentation). Concurrency is a must for network application, and here is a first look at how it can be accomplished. This first look is according to Chapter 3 of the textbook. We will revise and expand the discussion later.

  4. Application program interfaces ( handout and overhead presentation). This section is concerned with the principles and examples of application programming interfaces. In the textbook APIs are covered by Chapter 4, Chapter 5, and part of Chapter 6.

    Related code: You may find the following various helper functions for both servers and clients useful (take a look at the header for details). You are welcome to use them in your assignments, but first make sure you understand what happens in there. In other words, keep it someplace and refer to it once you are presented with new TCP-related concepts; the archive may contain examples of use for these concepts. You are not expected to understand all the code at once, concepts shall be introduced as the course progresses.

  5. Client design ( handout and overhead presentation). Clients may be complex pieces of software (think modern Web browser), but the communication part is fairly straightforward. This section is covered in the textbook in Chapter 6. Note that at this time we re only concerned with TCP clients; the UDP part will be discussed later.

    Related code: Here is a simple client. The archive contains the various functions for TCP clients you have seen already (tcp-utils.h and tcp-utils.cc), and code for a simple client that does roughly the same thing as the parameterized telnet client (client.cc).

  6. Server design ( handout and overhead presentation). Here is how a server looks like. Most of this discussion is also covered in Chapters 8 and 13 of the textbook, though critical regions are extra.

    Related code: You have seen a client, so we now have a server for a change. Besides the known tcp-utils module (tcp-utils.h and tcp-utils.cc), the archive contains a simple server, which receives lines of text from clients and send them back prefixed by a string. There are in fact three implementations of this server, produced by the following targets in the associated makefile (the default target makes them all):

  7. Multithreaded servers ( handout and overhead presentation). Concurrent programs (including obviously servers) can also be implemented in a single process using multiple threads of execution. This matter is also covered in Chapter 12 of the textbook.

    Related code: Here are two more servers: a multithreaded one (tserv.cc) and another which features a monitor thread (mtserv.cc). The implementation of the monitor is for all practical purposes identical to the one presented in Section 12.8 of the textbook. Note in passing that this archive also contains a makefile that through judicious macro definitions does not need any rule actions (except of course for the “clean” target).

Lecture recording

Lectures are recorded as follows: