MOUNT KENYA UNIVERSITY
Department of Information Technology
BIT 4205 Network Programming
CAT
Submission Guidelines:
• Responses should be well-structured, with clear explanations and references to academic
sources.
• Include relevant diagrams, charts, or tables to illustrate key concepts.
• Cite all sources used in APA/IEEE format.
• Plagiarism is highly penalized
1. A multinational corporation, TechX Ltd., operates in multiple locations worldwide. The
company requires a secure mechanism for transferring large files between its regional offices
using UNIX-based servers. However, the network administrator notices that some transfers
are experiencing significant delays, while others are failing due to connection timeouts.
Research and propose a secure and efficient file transfer method that ensures data integrity
and minimizes delays. Your response should discuss:
i. The type of socket programming model that would be suitable (TCP/UDP) and why.
ii. The role of network buffering and non-blocking sockets in improving transfer efficiency.
iii. How encryption mechanisms (such as TLS/SSL) can be integrated into the transfer
process.
2. A stock exchange platform wants to develop a real-time stock market data service that
provides updates to multiple clients simultaneously. The system should allow clients to
subscribe and receive instant notifications about stock price changes.
Design an outline for a multithreaded server application that supports concurrent clients
efficiently. Your research should address:
i. The advantages of using POSIX threads (pthreads) over a single-threaded server.
ii. The challenges in handling concurrent client requests and how thread
synchronization (mutexes and condition variables) can be used.
iii. A brief code snippet demonstrating how to create a basic thread pool using
pthreads.
3. An IT consulting firm is developing a DNS Lookup Utility for its internal network. The tool will
resolve domain names to IP addresses and vice versa. During testing, developers notice that
repeated lookups are slow, leading to unnecessary delays in network operations.
Investigate ways to optimize the performance of the DNS lookup utility by considering:
i. The benefits of using asynchronous DNS queries instead of synchronous lookups.
ii. The impact of implementing local caching and how it improves lookup speeds.
iii. How system calls like getaddrinfo() and res_query() can be used effectively.