views:

152

answers:

3

I need to design a website for a programming competition event. It will be similar to TOP CODER competitions. User will be given all questions & then user submits the code, that will be running on the server and checks if it gives the correct solution or not. The first one to finish all the questions is the winner.

I've no clue about how to proceed. Assume that languages that are supported are C, C++, Java.

+1  A: 

The question is a little general.

Assuming you've built the website and provided means for users to upload the code files to some directory on the server, there are ways to synchronize with some independent daemons running on the server that will take the programs, run them, and form an output page with the results. You would probably have to write these daemons yourself.

The major problem that you will have is one of security. You need to create a sandbox (easier with Java, not as easy with C/C++) because many participants will turn this into a "let's hack the server" competition.

I would personally be very wary about running unauthorized C/C++ code on a network connected machine.

Uri
Well that is the plan. How to implement?
Alice
+1  A: 

If you are okay with making use of an existing judge(evaluator) I would recommand the following:

PC2 is widely used for hosting online programming contests. You can download PC2 and configure it for your site. There is a wiki that will give you every detail you need.

With SPOJ you can host your contest on their site. Your participants will be given a special login valid only for your contest. This is the best option considering you need not have to setup and test anything.

If you are using PC2 I would highly recommend you to have a trial test run of the contest before the actual contest just to see how is your sever handling the load. It not uncommon to see programming contests being canceled when the servers just cannot take the load.

codaddict
Do you know which languages are supported for auto judgement by PC2? I couldn't find the information in the wiki...
Roberto Aloi
@Roberto: http://www.ecs.csus.edu/pc2/doc/faq/index.html#CONFIG-EDIT-LANGUAGE-FIELDS
codaddict
@codeaddict: Thanks. I've seen that before and it seems to suggest that you can extend PC2 with custom languages. The question is specific to the "auto judgement" feature. I assume they need some sort of *sandboxing* at the language level, to make the system safe. So, even if you add a custom language, you still need to sandbox it somehow. Or am I wrong?
Roberto Aloi
A: 

Hi

have you made the competiton finally please reply i m also doin one .... If yes please help me with it..

lucky