System Design of an Online Judge

What if you had to build CodeChef from scratch? How would you design a system for thousands of users participating in a contest?

Follow up: Make the system respond in real-time (message queues may slow things down)
I will be making a video on that next week. Wishing you all the best!