loading...

Creating a remote code execution server

#go
thetinygoat profile image Sachin Saini ・1 min read

I was always fascinated with sites like leetcode, hackerrank etc. I wondered how they can compile code and return its output to the user all in a browser, so i gave my self a personal challenge to create a server that would compile and execute user submitted code and return its output.

In this series i will be documenting my process as i go about implementing this.

So to begin with i wanted it to be a genereic solution and not a one off app, so to solve this the most logical thing that occured to me that could be done was to make it a server and expose a public api to the consumer to interact with the server.

You might have heard of this approach in various software like elasticsearch server, redis server and many more.

Elasticsearch in particular exposes an http REST API to the consumer to interact with the cluster, i would be following a similar approach and exposing an http API. the idea is to make the server as application agnostic, so it wont matter wether you are developing an application in java, node.js, ruby or whatever language you prefer the server interface will be the same.
Alt Text
The image above shows the basic architecture of the server.

I will be posting follow-up aritcles as i make more progress, util then happy coding :)
you can follow the project here

Posted on by:

thetinygoat profile

Sachin Saini

@thetinygoat

Currently a student, love to post about all things tech.

Discussion

markdown guide
 

That's a pity, 404 on the github link 😕