- Executes c, cpp, rust, python and javascript code
- Asynchronously background processes using goroutines.
- Realtime feedback to client using websocket layer.
- Code execution in sandboxed environment.
- Code sanitization and prevention of malicious code from executing.
- Multi stage docker build of golang application.
- Token based rate limiting.
- CI/CD pipeline to automatically push the server and worker instance images to docker hub with :latest tag.
- k8s scripts to deploy application to eks cluster manually using github actions dashboard.
- You take code, input and language as input, and send HTTP request.
- It gets added to rabbitmq queue.
- Worker will consume request from from queue and process it inside remote machine with docker pre-installed.
- We will ssh into remote machine and transfer our code and then spin up a new container
- Execute code inside container.
- Return the stderr, stdout to the user.
- Stop and remove the container
- Login to
https://www.cloudamqp.com/
- Create new Rabbitmq instance.
- Get AMQP instance and add to
.env
file of/server
directory
Given terraform script configures EC2 Ubuntu instance and docker pre-installed for IAM user.
- Create IAM user with
EC2FullAccess
andEC2InstanceConnect
(for SSH) permissions IAM dashboard in AWS console. - Install terraform
- Install AWS CLI
- Configure aws cli using IAM user access key and secret key:
aws configure
- Initialize terraform
terraform init
- Setup terraform state locally.
terraform plan -out=FILE
- Apply changes.
terraform apply
- Destroy the infrastructure
terraform destroy
- Post Request:
- Output: