When creating a MultiClient Server in C#, I can think of several ways to divide the work between the threads.
For this question, assume that the server accepts incoming TCP connections from the clients, and each client sends a file for the server, to store on the HardDrive.
Work Division 1: Thread per Client: The server will instantiate a new Thread per each new client that connects, and that thread will be responsible for that client. (those threads, are in addition to 1 "server thread")
Work Division 2: Thread per Resource: There will be 1 thread for handling the communication, and 1 thread for writing to the harddrive. A client object will be passed between each of these Resource-Responsible threads, and each Resource-Responsible thread will have its own queue so it can know what it should do. (and again, those threads are in addition to 1 "server thread")
Work Division 3: Thread per Sub-Task of the Main Task: Let's call the work that we need to do per each connecting client, as "the main task". So we'll break this main tasks into several Sub-Tasks, and create a thread for each sub-task, and again each thread will have a queue that will hold the client items that it should process. (this sounds similar to division 2, but in another project with the different work rather than a File Receiving Server, this type of division might be quite different from division 2)
My question is:
Are there other ways that are recommended for dividing the work between the threads?