📝 Description
This project involves creating a real-time quiz game application similar to Kahoot, focusing on client-server architecture and inter-process communication.
Server-side functionalities:
Manages client connections and initiates a 30-second timer upon client connection.
Utilizes a series of forks to handle questions, terminating each fork upon timer completion or when sufficient responses are received.
Aggregates responses and assigns points after each question, displaying the final score at the end of the game.
Client-side functionalities:
Connects to the server and attaches to shared memory.
Displays questions and allows users to submit answers within the given time frame.
Technical aspects:
Implementation of shared memory management, including key generation, segment creation, and attachment.
Use of inter-process communication mechanisms to handle real-time interactions between server and clients.
Error handling and synchronization to ensure smooth gameplay experience.
🧠 What I learned with it
Through this project, I gained experience in:
Developing client-server applications with real-time interaction capabilities.
Implementing inter-process communication (IPC) mechanisms, particularly shared memory and process forking.
Managing synchronization and concurrency in a multi-client environment.
Handling error detection and recovery to maintain application stability.
Designing and implementing timing mechanisms to control game flow and user interactions.
Understanding the complexities of real-time systems and the importance of efficient resource management.