samedi 21 avril 2018

How does LeetCode sandboxing work?

Or HackerRank. Or ideone. Or codepad. Or whatever flavour of online fiddle/code challenge website you prefer.

I'm currently working on making a proof-of-concept online grading tool to provide real-time feedback to students at my university when they submit coding assignments. Part of the requirements involve executing student code to evaluate their results. This will have to support compile-time languages such as C, C++, and Java. For security reasons, I would assume this code would need to be heavily sandboxed, possibly with a Docker container.

My question - how can this be scalable? Creating a docker container for every instance of code submitted by a user seems like it would be prohibitively slow. And yet, fiddle websites such as LeetCode seem to scale to hundreds of thousands of users.

Can anyone refer me to some useful resources that could help me learn a bit more about how to do this? (I'm a student myself, and therefore inexperienced, so I might be missing something obvious.)

Thanks!

Aucun commentaire:

Enregistrer un commentaire