{"id":18657498,"url":"https://github.com/amitanshusahu/node-containerized-execution-env","last_synced_at":"2025-04-11T18:31:33.229Z","repository":{"id":168036599,"uuid":"643179304","full_name":"amitanshusahu/node-containerized-execution-env","owner":"amitanshusahu","description":"LeetCode backend, scaleble nodjs backend which runs user submitted code in a containerized code execution envroment, implementaion of RabbitMq RPC, devops assignment of @hkirat","archived":false,"fork":false,"pushed_at":"2023-06-01T11:08:43.000Z","size":1734,"stargazers_count":18,"open_issues_count":0,"forks_count":6,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-25T17:07:16.532Z","etag":null,"topics":["dockerode","nodejs-server","rabbitmq","remote-code-execution"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/amitanshusahu.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-05-20T10:49:54.000Z","updated_at":"2024-11-04T08:14:27.000Z","dependencies_parsed_at":null,"dependency_job_id":"9f1f081e-7e8b-4d48-9e85-8e95fc4c7a55","html_url":"https://github.com/amitanshusahu/node-containerized-execution-env","commit_stats":null,"previous_names":["amitanshusahu/node-containerized-execution-env"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/amitanshusahu%2Fnode-containerized-execution-env","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/amitanshusahu%2Fnode-containerized-execution-env/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/amitanshusahu%2Fnode-containerized-execution-env/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/amitanshusahu%2Fnode-containerized-execution-env/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/amitanshusahu","download_url":"https://codeload.github.com/amitanshusahu/node-containerized-execution-env/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248458492,"owners_count":21107088,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["dockerode","nodejs-server","rabbitmq","remote-code-execution"],"created_at":"2024-11-07T07:28:39.019Z","updated_at":"2025-04-11T18:31:33.219Z","avatar_url":"https://github.com/amitanshusahu.png","language":"JavaScript","readme":"\u003cdiv align=\"center\"\u003e \n    \nhttps://github.com/amitanshusahu/node-containerized-execution-env/assets/83657737/df6c601a-6ec1-4a5c-a8ee-7c4b29a293c9\n\n\u003c/div\u003e\n\n## Set Up the Project\n- clone the repo\n```bash\ngit clone https://github.com/amitanshusahu/node-containerized-execution-env.git\n```\n- open the server folder inside the repo folder \n```bash\ncd  node-containerized-execution-env/server\n```\n\n- install all dependencies\n```bash\nnpm i\n```\n- pull node and gcc docker image\n```bash\n# pull latest node image\ndocker pull node\n# pull latest gcc image\ndocker pull gcc\n```\n- run RabbitMq and bind it to port 5672 in a terminal instance\n```bash\ndocker run \\\n-p 5672:5672 \\\nrabbitmq\n```\n- open another terminal instance and run the node server, from server folder\n```bash\n# go to server folder\ncd server\n# start the server\nnpm start\n```\n- open another terminal instance and serve the index.html, from client folder\n```bash\n# go from server folder to  client folder\ncd ../client\n# create a static server \nnpx serve\n```\n\n\u003e make sure `3000`, `3010`, `5672` are not bussyyyy!!\n\n## load test\n- install loadtest\n```bash\nnpm i -g loadtest\n```\n\n- test the server\n```bash\n# send 1000 reqs with an concorency level 100\nloadtest -n 1000 -c 100 http://localhost:3010\n```\n\n## References\n- [Remote Code Execution System just like kirat said](https://blog.devgenius.io/case-study-remote-code-execution-engine-system-63aa43344f24)\n- [Using RabbitMQ in node js app](https://www.rabbitmq.com/tutorials/tutorial-one-javascript.html)\n- [Docker Engine API to create and work with containers](https://docs.docker.com/engine/api/v1.42/#tag/Container/operation/ContainerCreate)\n- [An Implementation of the Docker API as node package - Dockerode](https://github.com/apocas/dockerode)\n- [Running Docker/Commnds using \"child-process\" module in node js (exec, spwan)](https://stackoverflow.com/questions/35644155/how-can-i-dynamically-create-a-docker-container-from-a-node-application)\n- [Parallel Processing/Multithreading in node js](https://deepsource.com/blog/nodejs-worker-threads/)\n- __Video Tutorials__\n    - [What are Messagin queue, RabbitMQ pub/sub with nodjs](https://youtu.be/e03c3CIGtYU)\n    - [Docker Tutorial, all about docker](https://youtu.be/3c-iBn73dDE)\n    - [Scale node js app using cluster module and test it with loadTest](https://youtu.be/9RLeLngtQ3A)\n\n\n\u003ch3 align=\"center\"\u003e Star the Repo ⭐ \u003c/h3\u003e\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Famitanshusahu%2Fnode-containerized-execution-env","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Famitanshusahu%2Fnode-containerized-execution-env","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Famitanshusahu%2Fnode-containerized-execution-env/lists"}