Difference between revisions of "BSc: Distributed And Network Programming"
(20 intermediate revisions by 4 users not shown) | |||
Line 1: | Line 1: | ||
+ | |||
= Distributed and Network Programming = |
= Distributed and Network Programming = |
||
+ | * '''Course name''': Distributed and Network Programming |
||
+ | * '''Code discipline''': XYZ |
||
+ | * '''Subject area''': xxx |
||
+ | == Short Description == |
||
− | * <span>'''Course name:'''</span> Distributed and Network Programming |
||
+ | This course covers the following concepts: Network programming concepts: Layered architecture, TCP and UDP sockets, multithreaded servers; Distributed systems concepts: system architecture, inter-process communication, remote procedure calls, peer-to-peer systems, coordination, replication, and fault tolerance.. |
||
− | * <span>'''Course number:'''</span> XYZ |
||
− | * <span>'''Knowledge area:'''</span> xxx |
||
− | == |
+ | == Prerequisites == |
− | === |
+ | === Prerequisite subjects === |
+ | * '''Networks''': 1) Understanding Application, Transport, and Network layers, 2) Basic socket programming experience |
||
+ | * '''Operating systems''' |
||
+ | === Prerequisite topics === |
||
− | * Network programming concepts: Layered architecture, TCP and UDP sockets, multithreaded servers |
||
− | * Distributed systems concepts: system architecture, inter-process communication, remote procedure calls, peer-to-peer systems, coordination, replication, and fault tolerance. |
||
− | === What is the purpose of this course? === |
||
+ | == Course Topics == |
||
+ | {| class="wikitable" |
||
+ | |+ Course Sections and Topics |
||
+ | |- |
||
+ | ! Section !! Topics within the section |
||
+ | |- |
||
+ | | Introduction to subject, computer networks basics, transport layer protocols, and socket programming || |
||
+ | # General introduction to the course |
||
+ | # Computer networks basic |
||
+ | # Socket programming |
||
+ | # UDP socket programming |
||
+ | # TCP socket programming |
||
+ | |- |
||
+ | | Multithreaded socket programming, RPCs, and distributed system architecture || |
||
+ | # Multithreading and multithreaded socket programming |
||
+ | # Remote procedure calls (RPCs) |
||
+ | # Distributed system architectures |
||
+ | |- |
||
+ | | Coordination, consistency, and replication in distributed systems || |
||
+ | # Clock synchronization algorithms (NTP, Berkeley) |
||
+ | # Logical clock (Lamport clocks) |
||
+ | # Mutual exclusion algorithms: permission-based, token-based |
||
+ | # Election algorithms: Bully, Ring |
||
+ | # Consistency models |
||
+ | # Replica management |
||
+ | # Consistency protocols |
||
+ | |- |
||
+ | | Fault tolerance and security in distributed systems || |
||
+ | # Intro to fault tolerance: Failure models, Failure masking by redundancy |
||
+ | # Process resilience: process groups, process replication, consensus in faulty systems, failure detection |
||
+ | # Reliable group communication: atomic multicast, |
||
+ | # Distributed commit |
||
+ | # Recovery: checkpointing |
||
+ | # Intro to security: threats, design issues, cryptography |
||
+ | # Secure channels: authentication, message integrity and confidentiality, secure group communication |
||
+ | # Access control: general issues, firewalls, secure mobile code, denial of service |
||
+ | # Secure naming |
||
+ | # Security management: Key management, secure group management, authorization management |
||
+ | |} |
||
+ | == Intended Learning Outcomes (ILOs) == |
||
+ | |||
+ | === What is the main purpose of this course? === |
||
Distributed and networked systems have become an integral part of our life, we use various applications such as chatting, online transactions, or cloud storage apps. All these popular applications are supported by an infrastructure (of servers) that is organized based on some concepts of distributed systems. The purpose of this course is to provide the students with the necessary concepts, models, and real-world problem-solving techniques of network programming and distributed systems. |
Distributed and networked systems have become an integral part of our life, we use various applications such as chatting, online transactions, or cloud storage apps. All these popular applications are supported by an infrastructure (of servers) that is organized based on some concepts of distributed systems. The purpose of this course is to provide the students with the necessary concepts, models, and real-world problem-solving techniques of network programming and distributed systems. |
||
− | === |
+ | === ILOs defined at three levels === |
− | |||
− | ==== What should a student remember at the end of the course? ==== |
||
− | |||
− | By the end of the course, the students should be able to recognize and define |
||
+ | ==== Level 1: What concepts should a student know/remember/explain? ==== |
||
+ | By the end of the course, the students should be able to ... |
||
* Concepts of network programming |
* Concepts of network programming |
||
* Different distributed system architectures |
* Different distributed system architectures |
||
Line 28: | Line 71: | ||
* Approaches to achieve fault tolerance and security in distributed systems |
* Approaches to achieve fault tolerance and security in distributed systems |
||
− | ==== What should a student be able to |
+ | ==== Level 2: What basic practical skills should a student be able to perform? ==== |
+ | By the end of the course, the students should be able to ... |
||
− | |||
− | By the end of the course, the students should be able to describe and explain (with examples) |
||
− | |||
* Difference between different transport protocols, when and why one is preferred over another |
* Difference between different transport protocols, when and why one is preferred over another |
||
* Difference between different distributed system architectures (centralized, decentralized, and hybrid) |
* Difference between different distributed system architectures (centralized, decentralized, and hybrid) |
||
Line 37: | Line 78: | ||
* How a new leader is elected in peer-to-peer systems (bully, ring) |
* How a new leader is elected in peer-to-peer systems (bully, ring) |
||
* How to achieve a consistent replicas across distributed systems (consistency models and protocols, content replication and placement) |
* How to achieve a consistent replicas across distributed systems (consistency models and protocols, content replication and placement) |
||
− | * Some methods to achieve the fault tolerance in distributed systems |
+ | * Some methods to achieve the fault tolerance in distributed systems |
− | |||
− | ==== What should a student be able to apply at the end of the course? ==== |
||
− | |||
− | By the end of the course, the students should be able to apply |
||
+ | ==== Level 3: What complex comprehensive skills should a student be able to apply in real-life scenarios? ==== |
||
+ | By the end of the course, the students should be able to ... |
||
* Building a custom application protocols on top of the existing transport protocols |
* Building a custom application protocols on top of the existing transport protocols |
||
* Writing multithreaded server and client apps with sockets |
* Writing multithreaded server and client apps with sockets |
||
* Using RPC for inter-process communication: command execution, file transfer |
* Using RPC for inter-process communication: command execution, file transfer |
||
* Building peer-to-peer systems with distributed protocol such as Chord |
* Building peer-to-peer systems with distributed protocol such as Chord |
||
− | * Building fault-tolerant systems with failure detection and leader election |
+ | * Building fault-tolerant systems with failure detection and leader election |
+ | == Grading == |
||
− | === Course |
+ | === Course grading range === |
+ | {| class="wikitable" |
||
− | |||
+ | |+ |
||
− | <div id="tab:OSCourseGradingRange"> |
||
− | |||
− | {| style="border-spacing: 2px; border: 1px solid darkgray;" |
||
− | |+ Course grade breakdown |
||
− | !align="center"| '''Component''' |
||
− | ! '''Points''' |
||
|- |
|- |
||
+ | ! Grade !! Range !! Description of performance |
||
− | | Laboratory assignments |
||
− | |align="right"| 55% |
||
|- |
|- |
||
+ | | A. Excellent || 90-100 || - |
||
− | | Final exam |
||
− | |align="right"| 35% |
||
|- |
|- |
||
+ | | B. Good || 75-89 || - |
||
− | | Attendance |
||
+ | |- |
||
− | |align="right"| 10% |
||
+ | | C. Satisfactory || 60-74 || - |
||
+ | |- |
||
+ | | D. Poor || 0-59 || - |
||
|} |
|} |
||
− | '''Important:''' In order to successfully finish the course, the student is required to score at least 50% in final exam. |
||
− | |||
− | === Grades range === |
||
− | |||
− | <div id="tab:OSCourseGradingRange"> |
||
+ | === Course activities and grading breakdown === |
||
− | {| style="border-spacing: 2px; border: 1px solid darkgray;" |
||
+ | {| class="wikitable" |
||
− | |+ Course grading range |
||
+ | |+ |
||
|- |
|- |
||
+ | ! Activity Type !! Percentage of the overall course grade |
||
− | | A. Excellent |
||
− | |align="right"| 90-100 |
||
|- |
|- |
||
+ | | Laboratory assignments || 55% |
||
− | | B. Good |
||
− | |align="right"| 75-89 |
||
|- |
|- |
||
+ | | Final exam || 35% |
||
− | | C. Satisfactory |
||
− | |align="right"| 60-74 |
||
|- |
|- |
||
+ | | Attendance || 10% |
||
− | | D. Poor |
||
− | |align="right"| 0-59 |
||
|} |
|} |
||
+ | === Recommendations for students on how to succeed in the course === |
||
− | === Resources and reference material === |
||
− | * '''Textbook:''' Maarten Van Steen, and Andrew S. Tanenbaum. ''Distributed systems'' (3rd Edition) Leiden, The Netherlands: Maarten van Steen, 2017. Available online: https://www.distributed-systems.net/ |
||
− | * '''Reference:''' George F. Coulouris, Jean Dollimore, and Tim Kindberg. ''Distributed systems: concepts and design'' (5th Edition) Addision Wesley, 2012. Available online: https://www.cdk5.net/wp/ |
||
− | * '''Reference:''' Sukumar Ghosh. ''Distributed systems: an algorithmic approach'' (2nd Edition) Chapman&Hall /CRC, Author’s own course material, Spring 2015. Available online: http://homepage.divms.uiowa.edu/~ghosh/16615.html |
||
+ | == Resources, literature and reference materials == |
||
− | == Course Sections == |
||
+ | === Open access resources === |
||
− | The course is organized in 8 weeks, with every weeks 4 academics hours of lectures and 4 academic hours of tutorials/labs. The main sections of the course and approximate hour distribution between them is as follows: |
||
+ | * Textbook: Maarten Van Steen, and Andrew S. Tanenbaum. Distributed systems (3rd Edition) Leiden, The Netherlands: Maarten van Steen, 2017. Available online: https://www.distributed-systems.net/ |
||
+ | * Reference: George F. Coulouris, Jean Dollimore, and Tim Kindberg. Distributed systems: concepts and design (5th Edition) Addision Wesley, 2012. Available online: https://www.cdk5.net/wp/ |
||
+ | * Reference: Sukumar Ghosh. Distributed systems: an algorithmic approach (2nd Edition) Chapman&Hall /CRC, Author’s own course material, Spring 2015. Available online: http://homepage.divms.uiowa.edu/~ghosh/16615.html |
||
+ | === Closed access resources === |
||
− | <div id="tab:OSCourseSections"> |
||
+ | |||
− | {| style="border-spacing: 2px; border: 1px solid darkgray;" |
||
+ | === Software and tools used within the course === |
||
− | |+ Course Sections |
||
+ | |||
− | !align="center"| '''Section''' |
||
+ | = Teaching Methodology: Methods, techniques, & activities = |
||
− | ! '''Section Title''' |
||
+ | |||
− | !align="center"| '''Teaching Hours''' |
||
+ | == Activities and Teaching Methods == |
||
+ | {| class="wikitable" |
||
+ | |+ Activities within each section |
||
|- |
|- |
||
+ | ! Learning Activities !! Section 1 !! Section 2 !! Section 3 !! Section 4 |
||
− | |align="center"| 1 |
||
− | | Introduction to subject, computer networks basics, transport layer protocols, and socket programming |
||
− | |align="center"| 12 |
||
|- |
|- |
||
+ | | Development of individual parts of software product code || 1 || 1 || 1 || 1 |
||
− | |align="center"| 2 |
||
− | | Multithreaded socket programming, remote procedure calls, and distributed system architecture |
||
− | |align="center"| 24 |
||
|- |
|- |
||
+ | | Homework and group projects || 1 || 1 || 1 || 1 |
||
− | |align="center"| 3 |
||
− | | Coordination, consistency, and replication in distributed systems |
||
− | |align="center"| 24 |
||
|- |
|- |
||
+ | | Testing (written or computer based) || 1 || 1 || 1 || 1 |
||
− | |align="center"| 4 |
||
+ | |- |
||
− | | Fault tolerance and security in distributed systems |
||
+ | | Oral polls || 1 || 1 || 1 || 1 |
||
− | |align="center"| 30 |
||
− | | |
+ | |- |
+ | | Discussions || 1 || 1 || 1 || 1 |
||
+ | |} |
||
+ | == Formative Assessment and Course Activities == |
||
+ | === Ongoing performance assessment === |
||
− | </div> |
||
− | === Section 1 === |
||
+ | ==== Section 1 ==== |
||
− | ==== Section title: Introduction to subject, computer networks basics, transport layer protocols, and socket programming ==== |
||
+ | {| class="wikitable" |
||
− | |||
+ | |+ |
||
− | ==== Topics covered in this section ==== |
||
− | |||
− | * General introduction to the course |
||
− | * Computer networks basic |
||
− | * Socket programming |
||
− | * UDP socket programming |
||
− | * TCP socket programming |
||
− | |||
− | ==== What forms of evaluation were used to test students’ performance in this section? ==== |
||
− | |||
− | <div id="tab:OSSectionEval1"> |
||
− | |||
− | {| style="border-spacing: 2px; border: 1px solid darkgray;" |
||
− | |''' ''' |
||
− | ! '''Yes/No''' |
||
|- |
|- |
||
+ | ! Activity Type !! Content !! Is Graded? |
||
− | | Development of individual parts of software product code |
||
− | |align="center"| 1 |
||
|- |
|- |
||
+ | | Question || What are the distributed systems? || 1 |
||
− | | Homework and group projects |
||
− | |align="center"| 1 |
||
|- |
|- |
||
+ | | Question || Give an example of distributed systems. || 1 |
||
− | | Midterm evaluation |
||
− | |align="center"| 0 |
||
|- |
|- |
||
+ | | Question || What are the advantages of layered architecture? || 1 |
||
− | | Testing (written or computer based) |
||
− | |align="center"| 1 |
||
|- |
|- |
||
+ | | Question || What are the roles of transport protocols? || 1 |
||
− | | Reports |
||
− | |align="center"| 0 |
||
|- |
|- |
||
+ | | Question || How the TCP and UDP differ from each other? When one is preferred over the other? || 1 |
||
− | | Essays |
||
− | |align="center"| 0 |
||
|- |
|- |
||
+ | | Question || What is socket programming? || 1 |
||
− | | Oral polls |
||
− | |align="center"| 1 |
||
|- |
|- |
||
+ | | Question || How socket programming is different for UDP and TCP? || 1 |
||
− | | Discussions |
||
− | |align="center"| 1 |
||
− | |} |
||
− | |||
− | |||
− | </div> |
||
− | ==== Typical questions for ongoing performance evaluation within this section ==== |
||
− | |||
− | # What are the distributed systems? |
||
− | # Give an example of distributed systems. |
||
− | # What are the advantages of layered architecture? |
||
− | # What are the roles of transport protocols? |
||
− | # How the TCP and UDP differ from each other? When one is preferred over the other? |
||
− | # What is socket programming? |
||
− | # How socket programming is different for UDP and TCP? |
||
− | |||
− | ==== Typical questions for seminar classes (labs) within this section ==== |
||
− | |||
− | # Write a simple UDP/TCP client-server echo program |
||
− | # Write a simple chatting program using UDP/TCP sockets |
||
− | # Given the simple echo server program, apply socket timeouts and catch timeout exceptions |
||
− | # Write a UDP-based reliable file transfer protocol |
||
− | # Write a program that parallelly executes the CPU-bound tasks using multiple processes |
||
− | |||
− | ==== Test questions for final assessment in this section ==== |
||
− | |||
− | # Describe an advantage of layered architecture? |
||
− | # Describe the differences between TCP and UDP protocols? |
||
− | # Provide examples when using UDP can be more reasonable than TCP? |
||
− | # Describe how UDP and TCP socket programming differ from each other? |
||
− | |||
− | === Section 2 === |
||
− | |||
− | ==== Multithreaded socket programming, RPCs, and distributed system architecture ==== |
||
− | |||
− | ==== Topics covered in this section ==== |
||
− | |||
− | * Multithreading and multithreaded socket programming |
||
− | * Remote procedure calls (RPCs) |
||
− | * Distributed system architectures |
||
− | |||
− | ==== What forms of evaluation were used to test students’ performance in this section? ==== |
||
− | |||
− | <div id="tab:OSSectionEval1"> |
||
− | |||
− | {| style="border-spacing: 2px; border: 1px solid darkgray;" |
||
− | |''' ''' |
||
− | ! '''Yes/No''' |
||
|- |
|- |
||
+ | | Question || Write a simple UDP/TCP client-server echo program || 0 |
||
− | | Development of individual parts of software product code |
||
− | |align="center"| 1 |
||
|- |
|- |
||
+ | | Question || Write a simple chatting program using UDP/TCP sockets || 0 |
||
− | | Homework and group projects |
||
− | |align="center"| 1 |
||
|- |
|- |
||
+ | | Question || Given the simple echo server program, apply socket timeouts and catch timeout exceptions || 0 |
||
− | | Midterm evaluation |
||
− | |align="center"| 0 |
||
|- |
|- |
||
+ | | Question || Write a UDP-based reliable file transfer protocol || 0 |
||
− | | Testing (written or computer based) |
||
− | |align="center"| 1 |
||
|- |
|- |
||
+ | | Question || Write a program that parallelly executes the CPU-bound tasks using multiple processes || 0 |
||
− | | Reports |
||
+ | |} |
||
− | |align="center"| 0 |
||
+ | ==== Section 2 ==== |
||
+ | {| class="wikitable" |
||
+ | |+ |
||
|- |
|- |
||
+ | ! Activity Type !! Content !! Is Graded? |
||
− | | Essays |
||
− | |align="center"| 0 |
||
|- |
|- |
||
+ | | Question || How the threads differ from processes? || 1 |
||
− | | Oral polls |
||
− | |align="center"| 1 |
||
|- |
|- |
||
+ | | Question || What are the I/O and CPU-bound tasks? || 1 |
||
− | | Discussions |
||
− | |align="center"| 1 |
||
− | |} |
||
− | |||
− | |||
− | </div> |
||
− | ==== Typical questions for ongoing performance evaluation within this section ==== |
||
− | |||
− | # How the threads differ from processes? |
||
− | # What are the I/O and CPU-bound tasks? |
||
− | # For what kind of tasks, using threads is preferred than using processes? |
||
− | # What is a remote procedure call? |
||
− | # What are some well-known distributed system architectures? |
||
− | # Discuss the structured and unstructured architectures. |
||
− | |||
− | ==== Typical questions for seminar classes (labs) within this section ==== |
||
− | |||
− | # You have a list of large numbers, and you need to find if they are prime or not. Would you use multithreading, multiprocessing, or sequential programming in order to complete the task asap? Prove it in practice. |
||
− | # You need to send multiple requests to a server and receive responses. Assume there is a few msecs of delay before you receive the response from the server. Would you use multithreading, multiprocessing, or sequential programming in order to complete the task asap? Prove it in practice. (Order of the requests/responses doesn't matter) |
||
− | # Discuss two ways of creating the threads using threading module in Python: 1) passing the worker function as a target, 2) subclassing the Thread class |
||
− | # What are the advantages of using RPC over using the low-level socket programming? |
||
− | # Discuss the p2p system |
||
− | |||
− | ==== Test questions for final assessment in this section ==== |
||
− | |||
− | # Discuss the differences between the threads and processes. |
||
− | # What is the Race condition? |
||
− | # Discuss the ways to protect the shared data from the race condition |
||
− | # You're given the worker function that just sleeps for a second and quits, implement the same behavior in a subclass of the Thread. |
||
− | # Discuss the RPC and its advantages over using the low-level socket programming? |
||
− | # Discuss the decentralized architecture: structured and unstructured p2p systems. |
||
− | |||
− | === Section 3 === |
||
− | |||
− | ==== Coordination, consistency, and replication in distributed systems ==== |
||
− | |||
− | ==== Topics covered in this section ==== |
||
− | |||
− | * Clock synchronization algorithms (NTP, Berkeley) |
||
− | * Logical clock (Lamport clocks) |
||
− | * Mutual exclusion algorithms: permission-based, token-based |
||
− | * Election algorithms: Bully, Ring |
||
− | * Data consistency models |
||
− | |||
− | ==== What forms of evaluation were used to test students’ performance in this section? ==== |
||
− | |||
− | <div id="tab:OSSectionEval1"> |
||
− | |||
− | {| style="border-spacing: 2px; border: 1px solid darkgray;" |
||
− | |''' ''' |
||
− | ! '''Yes/No''' |
||
|- |
|- |
||
+ | | Question || For what kind of tasks, using threads is preferred than using processes? || 1 |
||
− | | Development of individual parts of software product code |
||
− | |align="center"| 1 |
||
|- |
|- |
||
+ | | Question || What is a remote procedure call? || 1 |
||
− | | Homework and group projects |
||
− | |align="center"| 1 |
||
|- |
|- |
||
+ | | Question || What are some well-known distributed system architectures? || 1 |
||
− | | Midterm evaluation |
||
− | |align="center"| 0 |
||
|- |
|- |
||
+ | | Question || Discuss the structured and unstructured decentralized architectures. || 1 |
||
− | | Testing (written or computer based) |
||
− | |align="center"| 1 |
||
|- |
|- |
||
+ | | Question || You have a list of large numbers, and you need to find if they are prime or not. Would you use multithreading, multiprocessing, or sequential programming in order to complete the task asap? Prove it in practice. || 0 |
||
− | | Reports |
||
− | |align="center"| 0 |
||
|- |
|- |
||
+ | | Question || You need to send multiple requests to a server and receive responses. Assume there is a few msecs of delay before you receive the response from the server. Would you use multithreading, multiprocessing, or sequential programming in order to complete the task asap? Prove it in practice. (Order of the requests/responses doesn't matter) || 0 |
||
− | | Essays |
||
− | |align="center"| 0 |
||
|- |
|- |
||
+ | | Question || Discuss two ways of creating the threads using threading module in Python: 1) passing the worker function as a target, 2) subclassing the Thread class || 0 |
||
− | | Oral polls |
||
− | |align="center"| 1 |
||
|- |
|- |
||
+ | | Question || Given the function implemented locally, make it available to be called through RPC from remote process? Use xmlRPC. || 0 |
||
− | | Discussions |
||
+ | |} |
||
− | |align="center"| 1 |
||
+ | ==== Section 3 ==== |
||
− | |} |
||
+ | {| class="wikitable" |
||
− | |||
+ | |+ |
||
− | |||
+ | |- |
||
− | </div> |
||
+ | ! Activity Type !! Content !! Is Graded? |
||
− | ==== Typical questions for ongoing performance evaluation within this section ==== |
||
+ | |- |
||
− | |||
+ | | Question || How NTP protocol works? || 1 |
||
− | # How the threads differ from processes? |
||
+ | |- |
||
− | # What are the I/O and CPU-bound tasks? |
||
+ | | Question || How Berkeley protocol works? || 1 |
||
− | # For what kind of tasks, using threads is preferred than using processes? |
||
+ | |- |
||
− | # What is a remote procedure call? |
||
+ | | Question || Discuss the mutual exclusion algorithms. || 1 |
||
− | # What are some well-known distributed system architectures? |
||
+ | |- |
||
− | # Discuss the structured and unstructured architectures. |
||
+ | | Question || Discuss the permanent and server-initiated replicas and their difference || 1 |
||
− | |||
+ | |- |
||
− | ==== Typical questions for seminar classes (labs) within this section ==== |
||
+ | | Question || Explain the Primary-backup protocol. || 1 |
||
− | |||
+ | |- |
||
− | # You have a list of large numbers, and you need to find if they are prime or not. Would you use multithreading, multiprocessing, or sequential programming in order to complete the task asap? Prove it in practice. |
||
+ | | Question || Given three machines with drifting clocks, adjust their clocks using Berkeley algorithm. || 0 |
||
− | # You need to send multiple requests to a server and receive responses. Assume there is a few msecs of delay before you receive the response from the server. Would you use multithreading, multiprocessing, or sequential programming in order to complete the task asap? Prove it in practice. (Order of the requests/responses doesn't matter) |
||
+ | |- |
||
− | # Discuss two ways of creating the threads using threading module in Python: 1) passing the worker function as a target, 2) subclassing the Thread class |
||
+ | | Question || Explain how Bully algorithm for election works || 0 |
||
− | # What are the advantages of using RPC over using the low-level socket programming? |
||
+ | |- |
||
− | # Discuss the p2p system |
||
+ | | Question || Explain how Ring algorithm for election works || 0 |
||
− | |||
+ | |- |
||
− | ==== Test questions for final assessment in this section ==== |
||
+ | | Question || Explain the centralized (permission-based) method of mutual exclusion || 0 |
||
− | |||
+ | |} |
||
+ | ==== Section 4 ==== |
||
+ | {| class="wikitable" |
||
+ | |+ |
||
+ | |- |
||
+ | ! Activity Type !! Content !! Is Graded? |
||
+ | |- |
||
+ | | Question || Discuss the failure models || 1 |
||
+ | |- |
||
+ | | Question || Discuss different failure masking techniques by redundancy || 1 |
||
+ | |- |
||
+ | | Question || What is k-fault tolerant group? || 1 |
||
+ | |- |
||
+ | | Question || What is general model of failure detection? || 1 |
||
+ | |- |
||
+ | | Question || Explain basic reliable multicasting || 1 |
||
+ | |- |
||
+ | | Question || Explain what is authentication || 1 |
||
+ | |- |
||
+ | | Question || Explain what are message confidentiality and integrity || 1 |
||
+ | |- |
||
+ | | Question || Same as above || 0 |
||
+ | |} |
||
+ | === Final assessment === |
||
+ | '''Section 1''' |
||
+ | # Describe an advantage of layered architecture? |
||
+ | # Describe the differences between TCP and UDP protocols? |
||
+ | # Provide examples when using UDP can be more reasonable than TCP? |
||
+ | # Describe how UDP and TCP socket programming differ from each other? |
||
+ | '''Section 2''' |
||
# Discuss the differences between the threads and processes. |
# Discuss the differences between the threads and processes. |
||
# What is the Race condition? |
# What is the Race condition? |
||
Line 340: | Line 269: | ||
# Discuss the RPC and its advantages over using the low-level socket programming? |
# Discuss the RPC and its advantages over using the low-level socket programming? |
||
# Discuss the decentralized architecture: structured and unstructured p2p systems. |
# Discuss the decentralized architecture: structured and unstructured p2p systems. |
||
+ | '''Section 3''' |
||
+ | # Discuss NTP and Berkeley protocols for synchronization and explain their key difference |
||
+ | # Discuss permission-based and token-based solution for mutual exclusion. |
||
+ | # Discuss content replication: permanent, server-initiated, and client-initiated replicas. |
||
+ | # Explain the Primary-backup protocol, its advantages and disadvantages. |
||
+ | '''Section 4''' |
||
+ | # Same as above |
||
+ | === The retake exam === |
||
− | == Administrative details == |
||
+ | '''Section 1''' |
||
− | |||
− | * <span>'''Faculty:'''</span> Computer Science and Engineering |
||
− | * <span>'''Year of instruction:'''</span> 4th year of BS |
||
− | * <span>'''Semester of instruction:'''</span> 2nd semester |
||
− | * <span>'''No. of Credits:'''</span> 4 ECTS |
||
− | * <span>'''Total workload on average:'''</span> 144 hours overall |
||
− | * <span>'''Frontal lecture hours:'''</span> 2 per week |
||
− | * <span>'''Frontal tutorial hours:'''</span> 2 per week |
||
− | * <span>'''Lab hours:'''</span> 2 per week |
||
− | * <span>'''Individual lab hours:'''</span> 0 |
||
− | * <span>'''Frequency:'''</span> weekly throughout the semester |
||
− | * <span>'''Grading mode:'''</span> letters: A, B, C, D |
||
− | |||
− | == Prerequisites == |
||
− | |||
− | * Introduction to Programming I |
||
− | * Introduction to Programming II |
||
− | * Operating Systems |
||
− | * Networks |
||
− | |||
− | == Course outline == |
||
− | |||
− | This course focuses on the programming aspects of computer networks. Students will understand the current trends in communication protocols, socket programming and interprocess communication. Network programming will be covered for what concerns both wired networks and wireless networks. |
||
− | |||
− | == Expected learning outcomes == |
||
− | |||
− | * Understanding issues in concurrent network applications |
||
− | * Understand issues in implementing client/server systems using distributed programming techniques |
||
− | * Implementing multithreaded client/server applications |
||
− | |||
− | == Expected acquired core competences == |
||
− | |||
− | * Network programming |
||
− | * Socket programming |
||
− | * Client/Server applications |
||
− | * Peer to peer network programming |
||
− | |||
− | == Textbook == |
||
− | |||
− | * |
||
− | * |
||
− | |||
− | == Reference material == |
||
+ | '''Section 2''' |
||
− | * Lecturing and lab slides and material will be provided |
||
− | * Several resources are available online and will be pointed during the course |
||
+ | '''Section 3''' |
||
− | == Required computer resources == |
||
+ | '''Section 4''' |
||
− | Students should have laptops. |
Latest revision as of 18:27, 22 March 2023
Distributed and Network Programming
- Course name: Distributed and Network Programming
- Code discipline: XYZ
- Subject area: xxx
Short Description
This course covers the following concepts: Network programming concepts: Layered architecture, TCP and UDP sockets, multithreaded servers; Distributed systems concepts: system architecture, inter-process communication, remote procedure calls, peer-to-peer systems, coordination, replication, and fault tolerance..
Prerequisites
Prerequisite subjects
- Networks: 1) Understanding Application, Transport, and Network layers, 2) Basic socket programming experience
- Operating systems
Prerequisite topics
Course Topics
Section | Topics within the section |
---|---|
Introduction to subject, computer networks basics, transport layer protocols, and socket programming |
|
Multithreaded socket programming, RPCs, and distributed system architecture |
|
Coordination, consistency, and replication in distributed systems |
|
Fault tolerance and security in distributed systems |
|
Intended Learning Outcomes (ILOs)
What is the main purpose of this course?
Distributed and networked systems have become an integral part of our life, we use various applications such as chatting, online transactions, or cloud storage apps. All these popular applications are supported by an infrastructure (of servers) that is organized based on some concepts of distributed systems. The purpose of this course is to provide the students with the necessary concepts, models, and real-world problem-solving techniques of network programming and distributed systems.
ILOs defined at three levels
Level 1: What concepts should a student know/remember/explain?
By the end of the course, the students should be able to ...
- Concepts of network programming
- Different distributed system architectures
- Various synchronization and coordination techniques
- Different consistency models and replication methods
- Approaches to achieve fault tolerance and security in distributed systems
Level 2: What basic practical skills should a student be able to perform?
By the end of the course, the students should be able to ...
- Difference between different transport protocols, when and why one is preferred over another
- Difference between different distributed system architectures (centralized, decentralized, and hybrid)
- How a mutual exclusion is achieved between concurrent servers (centralized, distributed, token-ring, and decentralized)
- How a new leader is elected in peer-to-peer systems (bully, ring)
- How to achieve a consistent replicas across distributed systems (consistency models and protocols, content replication and placement)
- Some methods to achieve the fault tolerance in distributed systems
Level 3: What complex comprehensive skills should a student be able to apply in real-life scenarios?
By the end of the course, the students should be able to ...
- Building a custom application protocols on top of the existing transport protocols
- Writing multithreaded server and client apps with sockets
- Using RPC for inter-process communication: command execution, file transfer
- Building peer-to-peer systems with distributed protocol such as Chord
- Building fault-tolerant systems with failure detection and leader election
Grading
Course grading range
Grade | Range | Description of performance |
---|---|---|
A. Excellent | 90-100 | - |
B. Good | 75-89 | - |
C. Satisfactory | 60-74 | - |
D. Poor | 0-59 | - |
Course activities and grading breakdown
Activity Type | Percentage of the overall course grade |
---|---|
Laboratory assignments | 55% |
Final exam | 35% |
Attendance | 10% |
Recommendations for students on how to succeed in the course
Resources, literature and reference materials
Open access resources
- Textbook: Maarten Van Steen, and Andrew S. Tanenbaum. Distributed systems (3rd Edition) Leiden, The Netherlands: Maarten van Steen, 2017. Available online: https://www.distributed-systems.net/
- Reference: George F. Coulouris, Jean Dollimore, and Tim Kindberg. Distributed systems: concepts and design (5th Edition) Addision Wesley, 2012. Available online: https://www.cdk5.net/wp/
- Reference: Sukumar Ghosh. Distributed systems: an algorithmic approach (2nd Edition) Chapman&Hall /CRC, Author’s own course material, Spring 2015. Available online: http://homepage.divms.uiowa.edu/~ghosh/16615.html
Closed access resources
Software and tools used within the course
Teaching Methodology: Methods, techniques, & activities
Activities and Teaching Methods
Learning Activities | Section 1 | Section 2 | Section 3 | Section 4 |
---|---|---|---|---|
Development of individual parts of software product code | 1 | 1 | 1 | 1 |
Homework and group projects | 1 | 1 | 1 | 1 |
Testing (written or computer based) | 1 | 1 | 1 | 1 |
Oral polls | 1 | 1 | 1 | 1 |
Discussions | 1 | 1 | 1 | 1 |
Formative Assessment and Course Activities
Ongoing performance assessment
Section 1
Activity Type | Content | Is Graded? |
---|---|---|
Question | What are the distributed systems? | 1 |
Question | Give an example of distributed systems. | 1 |
Question | What are the advantages of layered architecture? | 1 |
Question | What are the roles of transport protocols? | 1 |
Question | How the TCP and UDP differ from each other? When one is preferred over the other? | 1 |
Question | What is socket programming? | 1 |
Question | How socket programming is different for UDP and TCP? | 1 |
Question | Write a simple UDP/TCP client-server echo program | 0 |
Question | Write a simple chatting program using UDP/TCP sockets | 0 |
Question | Given the simple echo server program, apply socket timeouts and catch timeout exceptions | 0 |
Question | Write a UDP-based reliable file transfer protocol | 0 |
Question | Write a program that parallelly executes the CPU-bound tasks using multiple processes | 0 |
Section 2
Activity Type | Content | Is Graded? |
---|---|---|
Question | How the threads differ from processes? | 1 |
Question | What are the I/O and CPU-bound tasks? | 1 |
Question | For what kind of tasks, using threads is preferred than using processes? | 1 |
Question | What is a remote procedure call? | 1 |
Question | What are some well-known distributed system architectures? | 1 |
Question | Discuss the structured and unstructured decentralized architectures. | 1 |
Question | You have a list of large numbers, and you need to find if they are prime or not. Would you use multithreading, multiprocessing, or sequential programming in order to complete the task asap? Prove it in practice. | 0 |
Question | You need to send multiple requests to a server and receive responses. Assume there is a few msecs of delay before you receive the response from the server. Would you use multithreading, multiprocessing, or sequential programming in order to complete the task asap? Prove it in practice. (Order of the requests/responses doesn't matter) | 0 |
Question | Discuss two ways of creating the threads using threading module in Python: 1) passing the worker function as a target, 2) subclassing the Thread class | 0 |
Question | Given the function implemented locally, make it available to be called through RPC from remote process? Use xmlRPC. | 0 |
Section 3
Activity Type | Content | Is Graded? |
---|---|---|
Question | How NTP protocol works? | 1 |
Question | How Berkeley protocol works? | 1 |
Question | Discuss the mutual exclusion algorithms. | 1 |
Question | Discuss the permanent and server-initiated replicas and their difference | 1 |
Question | Explain the Primary-backup protocol. | 1 |
Question | Given three machines with drifting clocks, adjust their clocks using Berkeley algorithm. | 0 |
Question | Explain how Bully algorithm for election works | 0 |
Question | Explain how Ring algorithm for election works | 0 |
Question | Explain the centralized (permission-based) method of mutual exclusion | 0 |
Section 4
Activity Type | Content | Is Graded? |
---|---|---|
Question | Discuss the failure models | 1 |
Question | Discuss different failure masking techniques by redundancy | 1 |
Question | What is k-fault tolerant group? | 1 |
Question | What is general model of failure detection? | 1 |
Question | Explain basic reliable multicasting | 1 |
Question | Explain what is authentication | 1 |
Question | Explain what are message confidentiality and integrity | 1 |
Question | Same as above | 0 |
Final assessment
Section 1
- Describe an advantage of layered architecture?
- Describe the differences between TCP and UDP protocols?
- Provide examples when using UDP can be more reasonable than TCP?
- Describe how UDP and TCP socket programming differ from each other?
Section 2
- Discuss the differences between the threads and processes.
- What is the Race condition?
- Discuss the ways to protect the shared data from the race condition
- You're given the worker function that just sleeps for a second and quits, implement the same behavior in a subclass of the Thread.
- Discuss the RPC and its advantages over using the low-level socket programming?
- Discuss the decentralized architecture: structured and unstructured p2p systems.
Section 3
- Discuss NTP and Berkeley protocols for synchronization and explain their key difference
- Discuss permission-based and token-based solution for mutual exclusion.
- Discuss content replication: permanent, server-initiated, and client-initiated replicas.
- Explain the Primary-backup protocol, its advantages and disadvantages.
Section 4
- Same as above
The retake exam
Section 1
Section 2
Section 3
Section 4