Simulate a scenario when a number of requests (represented by numbers) arrive at the server sequentially. You can use multithreads to process multiple requests: one thread for one request. A request arrives at the server, and waits in the queue for processing. An available thread will take the first request in the queue to process. You can use a timer to simulate the processing time. Also you can use a timer to count the time a request waiting in the queue. After processed, the request is saved into a file. Please compare the arrived requests and those saved, and make sure they are the same (on one missed).
**** The server and clients should work in different systems dynamically.