Skip to main content

Notice: this Wiki will be going read only early in 2024 and edits will no longer be possible. Please see: https://gitlab.eclipse.org/eclipsefdn/helpdesk/-/wikis/Wiki-shutdown-plan for the plan.

Jump to: navigation, search

Difference between revisions of "Crozzfire"

Line 22: Line 22:
  
 
===Few Questions Answered===
 
===Few Questions Answered===
*How does the student obtain the assignment from the server?
+
*'''How does the student obtain the assignment from the server?'''
  
 
The student just connects to the server, like any normal server-client connection and will use RPC. The server has the assignment. Every assignment has 4 very important fields:
 
The student just connects to the server, like any normal server-client connection and will use RPC. The server has the assignment. Every assignment has 4 very important fields:
Line 36: Line 36:
 
Of course #3 and #4 will NOT be visible to the client. But in case the client gets a wrong answer, the server will notify the client for which test case the answer failed (Useful esp for assignment solving). Grading will be adjusted likewise (more wrong answers... less the points).
 
Of course #3 and #4 will NOT be visible to the client. But in case the client gets a wrong answer, the server will notify the client for which test case the answer failed (Useful esp for assignment solving). Grading will be adjusted likewise (more wrong answers... less the points).
  
*Does the assignment automatically install into their environment?
+
*'''Does the assignment automatically install into their environment?'''
  
 
I think it is not necessary. Every assignment will be submitted along with the "Assignment code". There is no need for the assigment to get installed in the client's environment. It will jus be available as a document, which can be downloaded by the client.
 
I think it is not necessary. Every assignment will be submitted along with the "Assignment code". There is no need for the assigment to get installed in the client's environment. It will jus be available as a document, which can be downloaded by the client.
Line 44: Line 44:
 
Paste the source, along with the information and the assignment code and click "Submit" button. As simple as that! :)
 
Paste the source, along with the information and the assignment code and click "Submit" button. As simple as that! :)
  
*Does the student get a copy of the tests that will be run against their work?
+
*'''Does the student get a copy of the tests that will be run against their work?'''
  
 
Yes. But only the one's which did not match the correct output. No point letting the student know the test cases before hand (It becomes too easy!)
 
Yes. But only the one's which did not match the correct output. No point letting the student know the test cases before hand (It becomes too easy!)
  
*How does the judge interact with the server?
+
*'''How does the judge interact with the server?'''
  
 
The judge is basically a front-end for all code executions/results by JVM or MinGW compiler(For C/C++). It will accept the code and pass it for compilation. It will then run the program against a set of test cases, and handle every thing thereafter. Several methods will be available in the judge's engine which when invoked by the client(thru RPC) will return corresponding values.
 
The judge is basically a front-end for all code executions/results by JVM or MinGW compiler(For C/C++). It will accept the code and pass it for compilation. It will then run the program against a set of test cases, and handle every thing thereafter. Several methods will be available in the judge's engine which when invoked by the client(thru RPC) will return corresponding values.
  
*Does the server keep track of scores?
+
*'''Does the server keep track of scores?'''
  
 
Yes, Definitely ! Scores will be updated for each incoming submission. A class rank list can also be created.
 
Yes, Definitely ! Scores will be updated for each incoming submission. A class rank list can also be created.
  
What pieces will be run from within Eclipse, and what pieces will be on the server?
+
*'''What pieces will be run from within Eclipse, and what pieces will be on the server?'''
  
 
Only the compilers are OS specific and will be on the server. The assignment problem, test cases, output file will be on the server.Also maintaining a dynamic ranklist, scores will require a database server (Which should be installed in the server side). Everything else will be handled by eclipse.
 
Only the compilers are OS specific and will be on the server. The assignment problem, test cases, output file will be on the server.Also maintaining a dynamic ranklist, scores will require a database server (Which should be installed in the server side). Everything else will be handled by eclipse.
  
*How do you intend to check Memory consumption?
+
*'''How do you intend to check Memory consumption?'''
  
 
ulimit is the best way to calculate the memory consumption and time taken by a process. But it is available only to unix/linux systems. Hence to avoid such differences : Runtime.getruntime().totalMemory() and Runtime.getRuntime().freeMemory() will be used to check the memory consumption by JVM. (I still haven't tested this yet.)
 
ulimit is the best way to calculate the memory consumption and time taken by a process. But it is available only to unix/linux systems. Hence to avoid such differences : Runtime.getruntime().totalMemory() and Runtime.getRuntime().freeMemory() will be used to check the memory consumption by JVM. (I still haven't tested this yet.)

Revision as of 11:55, 31 March 2009

Project Description:

Title

Online Judge plugin to ECF

Abstract

Online judges are getting a lot of acceptance and response worldwide these days. Primarily, An Online judge is something which'll accept a piece of code (sent Online), compile and execute it and run it against a set of test cases to verify the correctness of the program. The result will be notified back to the client along with full details of the execution. Not only this, but an Online Judge also calculates other details such as Memory taken, Time of execution, Size of the Source code and so on. These judges are mostly used for conducting programming matches among a group of passionate people. But it can still be tweaked to do a lot of other stuffs. An online Judge can be used in a classrooms and make programming more exciting. It can be also use to teach basic programming concepts and carefully modified for it. In addition to this, the online judge is implemented in a group chat environment (On xmpp:jabber servers + gtalk integration). This would enhance the interaction and further increase the excitement. This project will add an Online Judge feature to ECF. Any one in the world can host an online competition/ programming session/ share codes online etc. Every code submission will be logged and necessary details will be E-mailed to the person.

Detailed Description

"Client" here would refer to the contestants and students . "Server" here would refer to the person hosting the Judge .

  • First of all the communication will be totally centralized on jabber servers. The basic idea is pretty simple: The person hosting the judge will add the clients to his/her list. The code submitted by the client will be run on the judge's machine. (The interface will be definitely attractive and easy to use).
  • Stress will be laid on the Interface so that people can submit codes while chatting with the group at the same time. This would certainly increase interaction and enthusiasm.
  • Group chat can be easily accomplished by existing API of ECF. Hence not much of time will be required to accomplish this task.
  • Working on the Judge Engine will be the major part. The code retrieved will be compiled and executed first. Multiple languages will be supported.
  • To start of with: C, C++ and Java codes can be submitted. To compile C/C++ codes: GCC(for Linux) or MinGW(for Windows) will be required. Java compilation will require JVM to be installed in the server machine.
  • The server will also have an option to log all the information for every code submissions. This would enable the users to check their history of submissions and details. A rank list will be maintained in case if its a programming contest. MYSQL can be used (connected via JDBC) to accomplish this task.
  • Emails will be sent to each client automatically after each code submission. The Email would include the source code, the result, Errors if any, Time of Execution, Memory taken etc.
  • File download feature will also be added to help the clients during a programming session/match.

Few Questions Answered

  • How does the student obtain the assignment from the server?

The student just connects to the server, like any normal server-client connection and will use RPC. The server has the assignment. Every assignment has 4 very important fields:

1)The Assignment code

2)The Assignment itself (description/question).

3)The input test cases for that assignment

4)The *correct* output file (To check the outputs)

Of course #3 and #4 will NOT be visible to the client. But in case the client gets a wrong answer, the server will notify the client for which test case the answer failed (Useful esp for assignment solving). Grading will be adjusted likewise (more wrong answers... less the points).

  • Does the assignment automatically install into their environment?

I think it is not necessary. Every assignment will be submitted along with the "Assignment code". There is no need for the assigment to get installed in the client's environment. It will jus be available as a document, which can be downloaded by the client.

  • What action does the student take to "hand in" their completed project?

Paste the source, along with the information and the assignment code and click "Submit" button. As simple as that! :)

  • Does the student get a copy of the tests that will be run against their work?

Yes. But only the one's which did not match the correct output. No point letting the student know the test cases before hand (It becomes too easy!)

  • How does the judge interact with the server?

The judge is basically a front-end for all code executions/results by JVM or MinGW compiler(For C/C++). It will accept the code and pass it for compilation. It will then run the program against a set of test cases, and handle every thing thereafter. Several methods will be available in the judge's engine which when invoked by the client(thru RPC) will return corresponding values.

  • Does the server keep track of scores?

Yes, Definitely ! Scores will be updated for each incoming submission. A class rank list can also be created.

  • What pieces will be run from within Eclipse, and what pieces will be on the server?

Only the compilers are OS specific and will be on the server. The assignment problem, test cases, output file will be on the server.Also maintaining a dynamic ranklist, scores will require a database server (Which should be installed in the server side). Everything else will be handled by eclipse.

  • How do you intend to check Memory consumption?

ulimit is the best way to calculate the memory consumption and time taken by a process. But it is available only to unix/linux systems. Hence to avoid such differences : Runtime.getruntime().totalMemory() and Runtime.getRuntime().freeMemory() will be used to check the memory consumption by JVM. (I still haven't tested this yet.)

Basic Architecture Diagram

alt arch diag

Future Extendability

In future this Judge can be turned into a full features virtual classroom with the following features:

  • Voice and Video Support
  • Optimized Streaming live Desktop of the server
  • Online Library support
  • Database support to store information related to the student
  • Other Web Based tools etc.

Experience in this Field

I, along with a passionate group of friends, have already created a totally stable online judge (from scratch) for our University. This was a web based project and we have successfully completed it by using Java server pages, Apache Tomcat 5.5 Web server/servlet container, MySQL database server. Though it is used to host only local competitions at the moment, in a short period of time it'll be hosted on the web. Current supported languages are C and C++ (using GCC) on a linux server. Snapshots of the webpages are attached below:

alt snap1
alt snap2

Back to the top