Hi,

I would like to know how do sites like ideone.com, topcoder.com etc take the code, compile it in the backend, run it and come back with the results.

My hunch is that the code is moved into a text file and then its compiled via gcc/javac/other compilers and then execute it and come back with the results.

I have two questions.

1. Is this scalable, and if not how to scale it up 2. How is the code sandboxed so that some malicious code doesn't get executed

Thanks