Compiling and Executing external code in C#
I am writing an application in C#, that will be Compiling and Executing external code written in either C, C++ or Java. In this regard, I have a few questions to ask and following is the research that I have done so far:

1. There will be server that will host the application that will receive requests of code submitted by users. These requests will be sent on a particular socket. 
2. There will be a receiver thread that would en queue all such requests into a queue.
3. There will be consumer thread that will dequeue from the queue and compile and execute the programs (submitted code). While compiling and executing, appropriate compilers and loaders will be used from the command line, which will be executed as processes from the C# App.
4. As of now, it can be assumed that security issues such as sandboxing, not making the server access public, etc have been / will be considered later. My primary focus is on this execution logic.

I have the following questions to ask:

1. Can there be a better way of doing this / Am I doing anything wrong?
2. How many simultaneous consumer threads can I create that can execute these programs in parallel, assuming that these programs will be homework assignments and not very large computational problems?
3. Should I consider a Linux (using mono) or a Windows server. Also, since I am more affluent in C#, I am preferring to write the app in C#. Is there any better P/L that I should use?


Compiling and Executing external code in C#
===

I am writing an application in C#, that will be Compiling and Executing external code written in either C, C++ or Java. In this regard, I have a few questions to ask and following is the research that I have done so far:

1. There will be server that will host the application that will receive requests of code submitted by users. These requests will be sent on a particular socket. 
2. There will be a receiver thread that would en queue all such requests into a queue.
3. There will be consumer thread that will dequeue from the queue and compile and execute the programs (submitted code). While compiling and executing, appropriate compilers and loaders will be used from the command line, which will be executed as processes from the C# App.
4. As of now, it can be assumed that security issues such as sandboxing, not making the server access public, etc have been / will be considered later. My primary focus is on this execution logic.

I have the following questions to ask:

1. Can there be a better way of doing this / Am I doing anything wrong?
2. How many simultaneous consumer threads can I create that can execute these programs in parallel, assuming that these programs will be homework assignments and not very large computational problems?
3. Should I consider a Linux (using mono) or a Windows server. Also, since I am more affluent in C#, I am preferring to write the app in C#. Is there any better P/L that I should use?

