Download as pdf or txt
Download as pdf or txt
You are on page 1of 14

Remote Code Executor

2019IMT079 Rajat Maheshwari


Outline
- Introduction
- Details of the Project
- Objectives
- Methodology
- System Architecture
- Results
- Future Scope Discussion
- References
Introduction
- In a widely connected world, accelerated due to the current pandemic
situation, the need to build easily accessible technology, is ever increasing.
- Despite internet being delivered to even the most remote places, some of
these places still don’t have high speed net.
- With the rapid development of computer technology, the demand for real-time
information is becoming higher, many real-time web applications such as
online booking system, stock trading system, instant messaging system, are
supposed to send the constant changes of the server to the client in real time.
- This puts more focus on building applications that are lightweight and can be
used even on mobile phones so as to reach the maximum audience possible
Project Details
- In this presentation, I will be talking about the project I have undertaken, i.e.,
building a Remote Code Executor, as an online Code Execution platform.
- This will allow users to run code in most major languages without any local
setup as the application will handle all of it for them under the hood.
- Users can pick from a list of most major languages, which already is
appealing to a wider audience, and start coding
- The server executes the code in a virtual environment using Docker, to
provide an isolated environment, to prevent malicious code from breaking the
backend.
- Multiple users can join a room, and code in a collaborative manner, or an
interviewer can join rooms, and conduct an interview.
Objectives
- Build a lightweight, fast and minimal code execution platform, to allow users
from all walks of life to take advantage of it
- Make it mobile responsive so that even people without proper hardware
setups can use it
- Make it Open-Source so anyone can clone and deploy it
- Make the server extremely lightweight, so it can run even on weaker
machines
- Integrate Sockets for real-time coding capabilities, allowing the platform to
transform into an assessment, or a collaborative coding platform
Methodology
- I am building a Remote Code Executor, capable of providing fast, and
lightweight execution methods to users
- I have used the MERN stack along with Docker, where MERN stands for
MongoDB, ExpressJS, ReactJS, and NodeJS.
- I have decided to make this project in this way because the MERN stack is by
far the most popular and widely known stack, and making this Open-Source
will allow even beginners to understand the code easily, and work with it
- Another library that I have used is SocketIO, that makes working with Web
Sockets easier and allows for a seamless and easily understandable realtime
integration for the server and frontend.
Methodology (Contd.)
- User writes code, gives custom input to evaluate code against
- Server generates random filename to store the input and the code
- A Docker container is spun up, the input and code files are copied in the
container and executed
- On completion of execution, the container is killed and the output or error is
returned to the frontend
- Response from the server is rendered to the output box on the frontend
System Architecture
Results
- I have completed building a proof of concept web application, that is capable
of allowing users to identify themselves and execute code in four major
languages, namely C++, Java, Python and Go.
- I have successfully optimised the code to the point where the frontend and
backend can both be hosted out of the same machine and utilize less than 1
GB RAM combined.
- The editor screen is completely mobile responsive, and users can use it
seamlessly on mobile phones as well
- Users are redirected to the identification screen on loss of internet connection
- Realtime functionalities have been completed and many users can work on a
single editor.
Screenshots
Future Scope Discussion
- Now that the platform has realtime coding capabilities, I’d like to add audio
and video support as well, so as to make the platform a complete package.
- The interviewer needs to use alternative means to keep track of the
candidate, and I’d like to keep all of it on a singular platform.
- Add support for even more languages to reach a wider audience
References
- ReactJS - https://reactjs.org/
- ExpressJS - https://expressjs.com/
- NodeJS - https://nodejs.org/
- Docker - https://www.docker.com/
- SocketIO - https://socket.io/
- Paper 1 -
https://www.researchgate.net/publication/312859164_SocketIO_and_Express
js
- Paper 2 -
https://www.researchgate.net/publication/274546480_A_Real-Time_Web_Ap
plication_Solution_Based_on_Nodejs_and_WebSocket

You might also like