Microservice project of cloud computing course that has 3 services and provides a code executer platform like Quera. You can run every service separately with this commands in their folders:
Firstnpm installthennode index.js. Note that you must have node.js installed on your system.
Also you can see project initiation in file initiation.pdf
That provides 3 APIs as follows:
-
Get the programming file with its details and user email from the user and store the file in S3 service and details in uploads table:
-
URL
/api/add
-
Method:
POST -
Data Params
- file (should be a programming file that CodeX API supports it)
- language (programming language file format like py, js, cs)
- inputs (inputs of program if it has input)
-
-
Get an id to execute it and send it to rabbitMQ service to manage there:
-
URL
/api/execute/:id
-
Method:
GET -
URL Params
Required:
id=[integer]
-
-
Get an email to return the results of the user files:
-
URL
/api/results/:email
-
Method:
GET -
URL Params
Required:
email=[string]
-
Listens for every id that come from amqp service and stores file details and content in jobs table.
Every few seconds check the job table and send non-executed jobs to CodeX API.