CSE384 - System and Network Programming

Course Overview:

Linux is a popular (Unix-like) open source operating system (OS) used in academia and many industrial/business environments. Since the mid-1990s, Linux has gained a global user-base and runs virtually everywhere including small embedded devices such as: phones, video game consoles, routers, televisions, to PCs, and all of the worlds top 500 supercomputers. https://www.linux.com/what-is-linux/ .

The objective of this course is to become familiar with the Linux environment (paradigm: fundational concepts, tools, conventions, and the systems programming interface). The course will begin with a focus on the the environment and tools needed to use Linux to perform technical tasks with proficiency. Topics will include: overview of Linux, review of shell(s) - bash, csh, tcsh, ksh, files, permissions, groups and ownership (chmod, chown, setuid), man pages, input/output streams, redirecton, pipes, vim, find, grep (regex), sed, etc. An introduction to BASH scripting and Python programming with corresponding student exercises will be required.

The course will continue with a focus on the Linux systems programming interface. Topics of interest include: system calls (e.g. open, read/write, fork, exec, etc), files and I/O, programming editors and IDEs, Makefiles, static and shared libaries, the C/C++ compilaton model, tool chains, processes and signals. The C programming language with the C standard library (libc), and (stdlib) will be used to develop useful tools and facilities that extend and customize the standard Linux environment. LIBPCAP (PCAP) is a widely used open source library for developing network tools (TCPdump, SNORT IDS, etc). PCAP code examples for processing network packets will be used to demonstrate advanced C language constructs including: pointers, memory allocation, resource management techniques, and abstract data types (ADT).

Client/Server models and socket programming examples will be used to introduce network (distributed) application programming and major related concepts including: threads, queues, and synchronization primitives such as mutex locks and semaphores. A C++ (socket-based) messaging middleware will be discussed, demonstrated, and made available as a reusable facility for developing complex distributed network applications. A comparison of C versus C++ programming models will be discussed. A significant final project will require the student to develop a distributed client/server application using socket-based messaging. Time permitting, a discussion of RPC and RESTful communication styles will be introduced and demonstrated.

DevOps (a portmanteau for "Development" and "Operations") is a recent and widely adopted set of practices that seek to enhance the efficiency of the software development life cycle (SLDC). Modern (Cloud) computing models provide DevOps services that utilize underlying Container technologies such as: Docker and Kubernetes. Time permitting, Docker Containers and Kubernetes will be discussed and demonstrated in action.

Software Courses at SU = 👍

Course Syllabus

Class Meeting Times:

Section 1 - MoWe 2:15pm-3:35pm - Location: Hall of Languages Section 2 - MoWe 5:15pm-6:35pm - Location: Link 105

Office Hours: QUESTIONS/HELP!
Mike Corley
CSE 384 Instructor
mwcorley@syr.edu
TA: Reyhaneh Abdolazimi
rabdolaz@syr.edu
TA: Chen Luo
cluo05@syr.edu
  • MoWe:
    4:00pm-5:00pm
    Location: CST 4-232
  • Thurs:
    12:00pm-1:00pm
    Location:CST 0-123
  • Tues:
    2:00pm-3:00pm
    Location:CST 0-124
Required Text and Notes: The Linux Command Line, Fifth Internet Edition : A Complete Introduction, William Shotts Free (PDF) format available at: linuxcommand.org The Linux Command Line, 2nd Edition: A Complete Introduction, William Shotts Amazon (paperback) Hands-On System Programming: with C++: Build performant and concurrent Unix and Linux systems with C++17 1st Edition, Dr. Rian Quinn
Grading: Weekly Homework/Exercises: 12 total (30%)
  • Homework exercises (H/W) will be assigned, and due at the beginning of each class on Wednesdays (see schedule)
  • H/W not submitted on time will incur 5 point penalty per day (There are to many students enrolled in this course to manage late H/W.)
    • Note: *** H/W and projects submitted via Blackboard on or before midnight of the due date ***
Class Attendance and Participation:(10%) Project 1:(20%)
  • Project(s) not submitted on the due date will incur a 1 point per day penalty
Midterm:(20%) Final Project:(20%)
  • The final project must be submitted on due date for sufficient time to grade
Academic Integrity: University Policy Please Read it Using someone else's work or ideas as your own is plagiarism! If plagiarism is detected, all parties involved will receive no credit for that project Be certain to source (give sufficient credit) all materials/ideas referenced (e.g. the web) that are not your own
Important dates: Spring 2020 Academic Calendar View here

Note: Both sections of this course are near enrollment capacity! Please attend the section in which you are registered! If there are not enough seats available, I will ask everyone not registered in the section to leave! Please help me to avoid that!

Note: The schedule as outlined below is fairly ambitious and tentative. We will add/remove/adjust content for the course as we progress. Some topics may be removed, extended, or combined. Consider the topics listed as a basic outline.

(Tentative) Lecture Schedule: CSE 384 - System and Network Programming
Topics Lecture Read before class Project
Course Introduction:
Lecture # 1 , Mon Jan 13
Course overview: materials, projects, grading, etc.
Virtual machine (Linux Test Environment) Setup
Lecture # 2 , Wed Jan 15
Setup/install VirtualBox/environment: (Mint/Ubuntu), Linux Overview H/W # 1
Martin Luther King Day: No classes!
Mon Jan 20
Martin Luther King Day: No class
Introduce Linux: Overview of shell(s) and Basic Commands
Lecture # 3 , Wed Jan 22
Topics: Files and I/O, permissions, groups and ownership (chmod, chown, setuid), man pages, input/output streams, redirection, pipes, vim, find, regular expressions grep, sed, etc. Chapters 1-5 H/W # 1 due today
H/W # 2
Linux Environment: shell commands, I/O redirection (pipelines), expansion, permissions
Lecture # 4 , Mon Jan 27
Topics: Files and I/O, permissions, groups and ownership (chmod, chown, setuid), man pages, input/output streams, redirection, pipelines, etc. Lecture Notes,
Chapters 5-9
Linux Environment: shell commands, I/O redirection (pipelines), expansion, permissions (cont.)
Lecture #5 , Wed Jan 29
Topics: Files and I/O, permissions, groups and ownership (chmod, chown, setuid), man pages, input/output streams, redirection, pipelines, etc. Lecture notes
chapters 5-9
H/W # 2 due
H/W # 3
Commonly used tools and commands
Lecture # 6 , Mon Feb 3
editors (vi, emacs, etc.), shell programs, grep and regular expressions, locate, tr, stat, time, find, sed, awk, etc. Lecture Notes
Shells environments and BASH Scripting
Lecture # 7 , Wed Feb 5
Shells: background (sh, csh, tcsh, bash), BASH scripting examples Lecture Notes
Chapter 24
H/W # 3 due
H/W # 4
Introduction to C/C++ Programming
Lecture # 8 , Mon Feb 10
Language overview: syntax, structure, conventions, compilation model, using gcc/g++, man pages, basic code examples and demonstration Lecture Notes
C/C++ Programming topics
Lecture # 9 , Web Feb 12
continue language overview: strings, functions, pointers, structs, headers, etc. C/C++ code demos, Lecture Notes H/W # 4 due
H/W # 5
*** Instructor travel: TA Recitation
Lecture # 10 , Mon Feb 17
Work on HW 5: TAs will be available during class to answer questions Lecture Notes
*** Instructor travel: TA Recitation
Lecture # 11 , Wed Feb 19
Work on HW 5: TAs will be available during class to answer questions Lecture Notes H/W # 5 (extended to 2/26)
Guest lecturer: Mr. Cully Patch (Cyber Security Topics)
Lecture # 12 , Mon Fed 24
“The “Why” and “What” of Computer Science/Cybersecurity pursuits to help you decide if you would want to apply your talents to help the World in this way.” Lecture Notes
Guest lecturer: Mr. Michael Weir (Machine Learning Topics)
Lecture # 13 , Wed Fed 26
"What is Machine Learning Anyway?" Lecture Notes H/W # 5 due
H/W # 7
C/C++ topics: input/output, files, memory management, pointers Lecture # 14 , Mon Mar 02 Files and I/O: C standard libary (glibc): fopen, fread, fwrite, etc.
C++ streams: ifstream, ofstream etc. Memory management: Heaps (malloc/free, new/delete)
lecture notes
C/C++ topics: input/output, files, memory management, pointers (continued)
Lecture # 15 , Weds Mar 4
Files and I/O: C standard libary (glibc): fopen, fread, fwrite, etc.
C++ streams: ifstream, ofstream etc. Memory management: Heaps (malloc/free, new/delete)
Lecture notes H/W # 7 due
H/W # 8
Midterm Review, Project 1 discussion, Systems Programming
Lecture # 16 , Mon Mar 9
Midterm review (ask questions)
Project 1 statement and requirements.
System calls (process creation): fork, exec
Lecture notes *** Project 1 assigned today ****
Project 1:
due Sunday April 5th
*** Midterm Exam Today ***
Lecture # 17 , Wed Mar 11
Will be completed in Blackboard during class: supervised by the instructors (bring your computer to class) Lecture notes H/W # 8 extended - due Friday 3/13
Project 1:
due Sunday April 5
Spring break
Mon Mar 16
*** Spring Break: no class **** Project 1:
due Sunday April 5
Spring break
Wed Mar 18
*** Spring Break: no class **** Project 1:
due Sunday April 5
Systems Programming topics
Lecture # 18 , Mon Mar 23
System calls (user/kernel space): open, read/write, fork, exec
Project 1 helpers,
C/C++ examples: serialization, file I/O
lecture notes Project 1:
due Sunday April 5

Project 1 help, questions
C/C++ examples
Lecture # 19 , Wed Mar 25
System calls (code examples: opem/read/write/fork/exec)
Files again: libc FILE implementation (buffered I/O) discussion
Demonstrate Serialization code examples
Project 1 discussion/questions
Lecture notes Project 1:
due Sunday April 5
*** Midterm solution review ***
Threads discussion/demos Lecture # 20 , Mon Mar 30
Threads overview: pthreads, C++ standard threads (code demos)
Thread synchronization (mutex locks): code demos using Threads and mutex
Lecture notes Project 1:
due Sunday April 5
Threads and Locks Examples (continued) Thread communication using queues
Lecture # 21 , Wed Apr 1
Thread Demos: Sharing data between threads, discuss and demonstrate Dr. Fawcett's blocking queue Lecture notes *** Project 1: due Monday April 6 *** Project 1
Introduction to Socket Programming
Lecture # 22 , Mon Apr 6
TCP/IP (review), Sockets overview (presentation), TCP (connnection-oriented) sockets: C/C++ code examples. Discuss Final project statement and requirements Lecture Notes *** Project 1: due tonight (midnight) April 6: 1 point off per day late *** Project 1
Sockets (continued), resusable C++ (socket) message passing library (MPL)
Lecture # 23 , Wed Apr 8
Socket code examples, putting in all togther: demonstrate threads, queues, locks, and sockets in a messaging passing framework for developing distributed (network) applications using message passing. Lecture notes *** Project 2 assigned: due Tues April 28th *** Project 2
Project 2 in class help session
Lecture # 24 , Mon Apr 13
Questions, Help on Project 2, Review Message Passing Library (MPL) code in more detail. Review File Transfer service example Lecture Notes Project 2
due Tues April 28th
Guest Lecture (The Rust Programming Language: Part 1 of 2):
Dr. James Fawcett
(Teaching Professor Emeritus Syracuse University)
Lecture # 25 , Wed Apr 15
Dr. Fawcett will discuss and demonstrate aspects of the Rust programming language in a two-part lecture series. Rust is a newer systems programming language designed for performance and safety (especially memory and concurrency). Lecture notes Project 2
due Tues April 28th
Dr. Fawcett's Rust Programming Lecture (Part 2 of 2)
Lecture # 26 , Mon Apr 20
Dr. Fawcett will continue with part 2 of lecture series on the Rust Programming Language
Lecture Notes Project 2
due Tues April 28th
Discuss/demo C++ Directory Natigator, review message passing code, project 2 questions
Lecture # 27 , Wed Apr 22
The C++ Navigator is a C++ version of the Rust DirNav example Dr. Fawcett discussed on 4/20, Final sockets and message passing with deeper look into the MPL code Lecture notes Project 2
due Tues April 28th
Static versus Shared object libraries, Project 2 help
Lecture # 28 , Mon Apr 27
Discuss libraries, review demo component (plug-in) code example, Project 2 questions Project 2 due tomorrow (midnight)
Thanks to all of you for making this a great class! Have a great summer and stay safe!
Lecture notes *** Project 2: due Tues April 28 *** Project 2