CIT 4409: NETWORK APPLICATION PROGRAMMING
MODULE ONE
Week One: Introduction to Network Application Programming
Topic: Networked Applications vs Networks, Role of Protocols
Delivery Mode: Lecture & Discussion
Practical Activity: Identify real-world network applications
1.0 Introduction
Network Application Programming is a foundational course for computer science students
aiming to design, implement, and maintain software that communicates over a network. This first
lecture focuses on understanding the difference between networks and networked applications,
and the crucial role protocols play in enabling communication.
Learning Outcomes:
By the end of this session, students should be able to:
1. Distinguish between a network and a networked application.
2. Describe the functions of protocols in network communication.
3. Identify real-world network applications and understand the protocols they use.
4. Analyze the client/server model and its relevance to network applications.
5. Prepare for hands-on socket programming in future labs.
2.0 Networks vs Networked Applications
2.1 Definition of a Network
A network is a collection of computers, servers, mainframes, network devices, and other devices
connected to allow sharing of data and resources. Networks can be wired or wireless and can
range from small (LAN – Local Area Network) to global (WAN – Wide Area Network).
Key components of a network:
• Hosts / Nodes: Computers or devices that communicate over the network.
• Routers and Switches: Devices that manage traffic and direct data packets.
• Media: Physical (cables) or wireless channels for transmitting data.
• Protocols: Rules governing communication.
Functions of a network:
• Data sharing and transfer
• Resource sharing (printers, storage)
• Collaboration (emails, chat, video conferencing)
• Remote access to services
Example Diagram
2.2 Definition of a Networked Application
A networked application is software that requires network communication to function. Unlike
standalone applications that work locally, networked applications rely on the network to
exchange data, request services, or collaborate with other applications.
Key characteristics:
• Uses protocols to communicate
• May follow client/server or peer-to-peer (P2P) architecture
• Handles network errors, latency, and security concerns
• Often designed to scale and support multiple users simultaneously
Examples of networked applications:
• Web browsers: Chrome, Firefox, Edge
• Email clients: Outlook, Thunderbird
• Chat applications: WhatsApp, Telegram, Slack
• File-sharing services: Dropbox, Google Drive
• Streaming services: Netflix, YouTube
2.3 Differences Between Networks and Networked Applications
Feature Network Networked Application
Function Provides infrastructure Uses infrastructure to perform tasks
Dependency Standalone hardware and software Relies on network services
Examples LAN, WAN, Internet Email clients, Web browsers
Scope Connects devices Connects software via network
Focus Data transport and connectivity Data processing and user interaction
3.0 Role of Protocols in Network Applications
Protocols are rules and conventions for communication between networked devices. They ensure
data is sent, received, and interpreted correctly.
3.1 Functions of Protocols
1. Data Formatting: Ensures sender and receiver agree on how data is structured (e.g.,
JSON, XML).
2. Communication Management: Controls how sessions start, maintain, and terminate.
3. Error Detection and Recovery: Ensures integrity of transmitted data (e.g.,
retransmission in TCP).
4. Flow Control: Prevents the sender from overwhelming the receiver.
5. Security: Encrypts data or authenticates users.
3.2 Protocol Types Relevant to Applications
Application Layer Protocols: Operate at the top of the TCP/IP stack.
• HTTP / HTTPS: For web browsing and web services
• FTP / SFTP: File transfer
• SMTP / IMAP / POP3: Email
• DNS: Resolving domain names to IP addresses
• MQTT / CoAP: Lightweight IoT communication
Transport Layer Protocols: Ensure data is delivered.
• TCP (Transmission Control Protocol): Reliable, connection-oriented
• UDP (User Datagram Protocol): Connectionless, faster but no guaranteed delivery
Example Discussion:
• Why HTTPS is preferred over HTTP
• When UDP is used in applications (e.g., VoIP, streaming)
4.0 Network Programming Perspective
Network application development focuses on how software communicates over networks.
4.1 Sockets
• A socket is an endpoint for sending or receiving data.
• Each socket is identified by:
o IP address
o Port number
• Programming languages provide socket APIs (Python, Java, C++).
Socket Types:
• Stream sockets (TCP) – reliable, connection-oriented
• Datagram sockets (UDP) – fast, connectionless
4.2 Client/Server Model
Server:
• Listens for incoming client requests
• Processes requests and responds
Client:
• Initiates requests to the server
• Waits for server response
•
Example Diagram:
Discussion Points:
• Examples of client/server apps: Web server, Email server, Chat server
• Scaling issues with multiple clients
4.3 Peer-to-Peer (P2P) Model
• Each node can act as both client and server
• Examples: BitTorrent, blockchain networks
5.0 Real-World Network Applications
Case Study 1 – Web Browsers
• Uses HTTP/HTTPS to communicate with web servers
• Handles sessions, cookies, and caching
Case Study 2 – Email Clients
• Uses SMTP for sending emails
• Uses IMAP/POP3 for receiving emails
Case Study 3 – Chat Applications
• Uses TCP or UDP for real-time messaging
• Handles multiple clients using threads or async programming
Case Study 4 – IoT Devices
• Uses lightweight protocols (MQTT, CoAP) for sensors
• Often communicates with cloud services
6.0 Practical Activity
Objective: Identify real-world network applications and analyze protocols used
Exercise:
1. Pick any 3 applications from your phone/computer
2. Identify:
o Protocols used
o Client/server or P2P architecture
o Security features implemented
3. Present findings in class
Example Template:
Application Protocol Architecture Security
WhatsApp TCP/UDP Client/Server End-to-End Encryption
Gmail SMTP/IMAP Client/Server TLS Encryption
YouTube HTTP/HTTPS Client/Server HTTPS & OAuth
7.0 Discussion Questions
1. Why do some applications use UDP instead of TCP?
2. How does a protocol ensure reliable communication over an unreliable network?
3. Compare client/server and P2P models in terms of scalability and reliability.
4. What are the key differences between HTTP and HTTPS?
8.0 Summary
• Networks provide connectivity; networked applications provide services.
• Protocols govern communication and ensure reliability, security, and interoperability.
• The client/server model is foundational in network application design.
• Real-world applications include web browsers, email clients, chat apps, file-sharing, and
IoT devices.
• Understanding these concepts is essential before learning socket programming.
9.0 References
• Ciubotaru, B., & Muntean, G.-M. (2013). Advanced Network Programming – Principles
and Techniques. Springer.
• Harold, E. R. (2014). Java Network Programming (4th ed.). O’Reilly Media.
• Kurose, J. F., & Ross, K. W. (2017). Computer Networking: A Top-Down Approach (7th
ed.). Pearson.
• Rhodes, B., & Goerzen, J. (2014). Foundations of Python Network Programming.