shashankkumar / CodeRunner

An online judge for conducting programming contests and running 24*7 programming sites.
66 stars 26 forks source link

Changes to do. #3

Closed sunits789 closed 10 years ago

sunits789 commented 11 years ago

I guess all of u working on the coderunner remember what problems it faced during Insomnia. Let me revise it for u. 1) "\n" thing. All the "\n"s were replaced by newline while coderunner was fetching the source code. The main reason behind this was some change in php config at the cogni server as stated by nemo/rushil . May be ask them for the correct reason. 2) The interruption from cloudflare. The pings made by coderunner on the server invited some interruption from cloudflare. The url pinged did not return the source code but some html from cloudflare that we are pinging too much. For this reason we had to constantly take coderunner off / even had to take cloudflare down but that resulted in delayed judging/ unresponsive website respectively.

Now the changes that I suggest is: CodeRunner SHOULD NOT ping the server for submission details. This is not the way things should be. CodeRunner should listen to a port on localhost where the server can do a "POST" request with all the submission details in the JSON form. Read the data from JSON, and process accordingly. The judgement result pushing neednot be changed. This model will sovle both the problems stated above, make coderunner more portable and moreover it is the correct way of interraction between applications. Better would be branch out at this point to work on this feature. There is nodejs library for cpp ( "node.h" as i remember) for this purpose. I hope this will be given the higher preference among other features. If u have any implementation related query, feel free to ask.

captn3m0 commented 11 years ago

On the last point, you cannot make coderunner ping to your grader (which would have been ideal) because we, in the insti, are behind a NAT, and coderunner website cannot access the grader.

captn3m0 commented 11 years ago

Also, as an alternative (since we now know that coderunner has security issues), I was thinking maybe we should just use the hackerearth api for grading purposes. We can make the grader pretty slim using this. We'd get support for C, CPP, CPP11, CLOJURE, JAVA, JAVASCRIPT, HASKELL, PERL, PHP, PYTHON, RUBY as well.

sunits789 commented 11 years ago

If we set-up coderunner at the same server at which codevillage is, then codevillage website can surely acces the coderunner through localhost. If someday we will take it online, then grader would also have constant IP. As far as using someone else's api is concerned, doing so simply means we are giving up. I want to have a perfect grader totally of our own( and may be we will also be able to launch apis someday ). Though that hackerearth api thing is quite easy and mature as well. But still it has those unfortunate class bugs that our grader dont have. I dont have that much network security knowledge, but there are other people who can work on it.

captn3m0 commented 11 years ago

If we set-up coderunner at the same server at which codevillage is, then codevillage website can surely acces the coderunner through localhost.

Yes, you are right on this. Unfortunately, this will also involve getting a vps server, not a shared-hosting server, which is what we had for this year's cogni.

shashankkumar commented 11 years ago

Take this discussion offline or email this is not a good place. On Jul 4, 2013 12:50 AM, "Abhay Rana (Nemo)" notifications@github.com wrote:

If we set-up coderunner at the same server at which codevillage is, then codevillage website can surely acces the coderunner through localhost. Yes, you are right on this. Unfortunately, this will also involve getting a vps server, not a shared-hosting server, which is what we had for this year's cogni.

— Reply to this email directly or view it on GitHubhttps://github.com/shashankkumar/CodeRunner/issues/3#issuecomment-20463555 .

khare-ashwini commented 11 years ago

2) The interruption from cloudflare I think we were able to bypass any interference from cf by using the direct.insomnia path .Did it not work?

sunits789 commented 11 years ago

The returning of HTML in place of source code happened whole night. It should have had worked but it didnt. There might be some unknown reason behind it.

On Thu, Jul 4, 2013 at 6:17 PM, Ashwini Khare notifications@github.comwrote:

2) The interruption from cloudflare I think we were able to bypass any interference from cf by using the direct.insomnia\ path .Did it not work?

— Reply to this email directly or view it on GitHubhttps://github.com/shashankkumar/CodeRunner/issues/3#issuecomment-20475177 .

Regards:- SUNIT KUMAR SINGH IIT Roorkee Electrical Engineering, Year-2